LambdaToSql/FrameWork/Table.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LambdaToSql.FrameWork
{
internal class Table
{
/// <summary>
/// 缓存帮助类
/// </summary>
public FrameWork.CacheHelper Cache = FrameWork.CacheHelper.Instance;
/// <summary>
/// 数据库上下文对象
/// </summary>
public LambdaToSql.EntityModel.DbContext Context { get; set; }
/// <summary>
/// 表结构
/// </summary>
public Dictionary<string, LambdaToSql.EntityModel.Table> DicTable
{
get
{
Dictionary<string, LambdaToSql.EntityModel.Table> table;
if (!string.IsNullOrEmpty(this.Context.ConnectionStringName))
{
if (Cache[this.Context.ConnectionStringName] != null)
{
table = Cache[this.Context.ConnectionStringName] as Dictionary<string, LambdaToSql.EntityModel.Table>;
}
else
{
table = GetDataTable();
Cache[this.Context.ConnectionStringName] = table;
}
}
else
{
table = GetDataTable();
}
return table;
}
}
#region 获取数据库表字段实体
/// <summary>
/// 获取数据库表字段实体
/// </summary>
/// <returns></returns>
private Dictionary<string, LambdaToSql.EntityModel.Table> GetDataTable()
{
if (this.Context.SqlType == LambdaToSql.EntityModel.SqlType.MsSqlServer)
{
return GetDataTableByMsSqlServer();
}
else if (this.Context.SqlType == LambdaToSql.EntityModel.SqlType.SQLite)
后面还有 114 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
