📄 models.smark.cs
字号:
get {
return " Employees ";
}
}
public static System.Collections.Generic.IList<Employee> List(IConnectinContext context, Expression expression, Region region, string OrderBy) {
return EntityBase.OnList<Employee>(context, Employee.mSelectString, expression, region, OrderBy, Employee.mGroupString);
}
public static System.Collections.Generic.IList<Employee> List(IConnectinContext context, Expression expression) {
return Employee.List(context, expression, null, null);
}
public static System.Collections.Generic.IList<Employee> List(Expression expression, Region region, string OrderBy) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.List(_context, expression, region, OrderBy);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static System.Collections.Generic.IList<Employee> List(Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.List(_context, expression, null, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static Employee ListFirst(IConnectinContext context, Expression expression, string OrderBy) {
return EntityBase.OnListFirst<Employee>(context, Employee.mSelectString, expression, OrderBy, Employee.mGroupString);
}
public static Employee ListFirst(IConnectinContext context, Expression expression) {
return Employee.ListFirst(context, expression);
}
public static Employee ListFirst(Expression expression, string OrderBy) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.ListFirst(_context, expression, OrderBy);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static Employee ListFirst(Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.ListFirst(_context, expression, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static int Count(IConnectinContext context, Expression expression) {
return EntityBase.OnCount(context, "Employees", expression, Employee.mGroupString);
}
public static int Count(Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.Count(_context, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object AVG(IConnectinContext context, string field, bool DISTINCT, Expression expression) {
return EntityBase.OnAggregation(context, "Employees", "AVG", field, DISTINCT, expression, Employee.mGroupString);
}
public static object AVG(IConnectinContext context, string field, Expression expression) {
return Employee.AVG(context, field, false, expression);
}
public static object AVG(IConnectinContext context, string field) {
return Employee.AVG(context, field, false, null);
}
public static object AVG(IConnectinContext context, string field, bool DISTINCT) {
return Employee.AVG(context, field, DISTINCT, null);
}
public static object AVG(string field, bool DISTINCT, Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.AVG(_context, field, DISTINCT, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object AVG(string field, Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.AVG(_context, field, false, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object AVG(string field) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.AVG(_context, field, false, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object AVG(string field, bool DISTINCT) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.AVG(_context, field, DISTINCT, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object SUM(IConnectinContext context, string field, bool DISTINCT, Expression expression) {
return EntityBase.OnAggregation(context, "Employees", "SUM", field, DISTINCT, expression, Employee.mGroupString);
}
public static object SUM(IConnectinContext context, string field, Expression expression) {
return Employee.SUM(context, field, false, expression);
}
public static object SUM(IConnectinContext context, string field) {
return Employee.SUM(context, field, false, null);
}
public static object SUM(IConnectinContext context, string field, bool DISTINCT) {
return Employee.SUM(context, field, DISTINCT, null);
}
public static object SUM(string field, bool DISTINCT, Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.SUM(_context, field, DISTINCT, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object SUM(string field, Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.SUM(_context, field, false, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object SUM(string field) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.SUM(_context, field, false, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object SUM(string field, bool DISTINCT) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.SUM(_context, field, DISTINCT, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object MAX(IConnectinContext context, string field, Expression expression) {
return EntityBase.OnAggregation(context, "Employees", "MAX", field, false, expression, Employee.mGroupString);
}
public static object MAX(IConnectinContext context, string field) {
return Employee.MAX(context, field, null);
}
public static object MAX(string field, Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.MAX(_context, field, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object MAX(string field) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.MAX(_context, field, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object MIN(IConnectinContext context, string field, Expression expression) {
return EntityBase.OnAggregation(context, "Employees", "MIN", field, false, expression, Employee.mGroupString);
}
public static object MIN(IConnectinContext context, string field) {
return Employee.MIN(context, field, null);
}
public static object MIN(string field, Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.MIN(_context, field, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static object MIN(string field) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.MIN(_context, field, null);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
protected override void OnLoadData(System.Data.IDataReader reader) {
if ((reader["_EmployeeID"] != System.DBNull.Value)) {
this.EmployeeID = ((int)(this.Convert(typeof(int), reader["_EmployeeID"])));
}
if ((reader["_FirstName"] != System.DBNull.Value)) {
this.FirstName = ((string)(this.Convert(typeof(string), reader["_FirstName"])));
}
if ((reader["_LastName"] != System.DBNull.Value)) {
this.LastName = ((string)(this.Convert(typeof(string), reader["_LastName"])));
}
if ((reader["_Country"] != System.DBNull.Value)) {
this.Country = ((string)(this.Convert(typeof(string), reader["_Country"])));
}
if ((reader["_ReportsTo"] != System.DBNull.Value)) {
this.ReportsTo = ((int)(this.Convert(typeof(int), reader["_ReportsTo"])));
}
if ((reader["_HireDate"] != System.DBNull.Value)) {
this.HireDate = ((System.DateTime)(this.Convert(typeof(System.DateTime), reader["_HireDate"])));
}
if ((reader["_BirthDate"] != System.DBNull.Value)) {
this.BirthDate = ((System.DateTime)(this.Convert(typeof(System.DateTime), reader["_BirthDate"])));
}
}
public static void Delete(IConnectinContext context, Expression expression) {
EntityBase.OnDelete(context, "Employees", expression);
}
public static void Delete(Expression expression) {
IConnectinContext _context;
_context = DBContext.Context;
try {
Employee.Delete(_context, expression);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public static Employee Load(IConnectinContext context, int id) {
return EntityBase.OnLoad<Employee>(context, Employee.mSelectString, "EmployeeID", id);
}
public static Employee Load(int id) {
IConnectinContext _context;
_context = DBContext.Context;
try {
return Employee.Load(_context, id);
}
catch (System.Exception e_) {
throw e_;
}
finally {
_context.Dispose();
}
}
public virtual void Save(IConnectinContext context) {
System.Collections.Generic.IList<Field> _fields;
Field _id;
Field item;
_fields = new System.Collections.Generic.List<Field>();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -