⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 views.smark.cs

📁 smark.data是基于C#开发的轻量级数据访问组件。 提供以下功能封: 1)提供了跨数据库类型操作能力 2)基于程线存储的数据访问上下文对象
💻 CS
📖 第 1 页 / 共 2 页
字号:
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1433
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace Smark.Data.TestCase {
    using System;
    using System.Data;
    using Smark.Data;
    
    
    /// <summary>
    /// Smark.Data.VSGenerator Copyright 泥水佬
    /// Email:henryfan@msn.com
    /// MappingTable: orders o inner join employees e on o.employeeid=e.employeeid
    /// 
    /// </summary>
    [Serializable()]
    public partial class OrdersByEmployee : EntityBase {
        
        private int mOrders;
        
        public static FieldInfo orders = new FieldInfo(" orders o inner join employees e on o.employeeid=e.employeeid", "*");
        
        private int mEmployeeID;
        
        public static FieldInfo employeeID = new FieldInfo(" orders o inner join employees e on o.employeeid=e.employeeid", "e.Employeeid");
        
        private string mEmployeeName;
        
        public static FieldInfo employeeName = new FieldInfo(" orders o inner join employees e on o.employeeid=e.employeeid", "(FirstName+LastName)");
        
        static string mSelectString = "Select (Count(*)) as _Orders,(e.Employeeid) as _EmployeeID,((FirstName+LastName))" +
            " as _EmployeeName from  orders o inner join employees e on o.employeeid=e.employ" +
            "eeid";
        
        static string mGroupString = "(e.Employeeid),((FirstName+LastName))";
        
        /// <summary>
        /// 
        /// </summary>
        public virtual int Orders {
            get {
                return this.mOrders;
            }
            set {
                this.mOrders = value;
                this.EntityState.FieldChange("*");
            }
        }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual int EmployeeID {
            get {
                return this.mEmployeeID;
            }
            set {
                this.mEmployeeID = value;
                this.EntityState.FieldChange("e.Employeeid");
            }
        }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual string EmployeeName {
            get {
                return this.mEmployeeName;
            }
            set {
                this.mEmployeeName = value;
                this.EntityState.FieldChange("(FirstName+LastName)");
            }
        }
        
        public static string Table {
            get {
                return "  orders o inner join employees e on o.employeeid=e.employeeid ";
            }
        }
        
        public static System.Collections.Generic.IList<OrdersByEmployee> List(IConnectinContext context, Expression expression, Region region, string OrderBy) {
            return EntityBase.OnList<OrdersByEmployee>(context, OrdersByEmployee.mSelectString, expression, region, OrderBy, OrdersByEmployee.mGroupString);
        }
        
        public static System.Collections.Generic.IList<OrdersByEmployee> List(IConnectinContext context, Expression expression) {
            return OrdersByEmployee.List(context, expression, null, null);
        }
        
        public static System.Collections.Generic.IList<OrdersByEmployee> List(Expression expression, Region region, string OrderBy) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.List(_context, expression, region, OrderBy);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static System.Collections.Generic.IList<OrdersByEmployee> List(Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.List(_context, expression, null, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static OrdersByEmployee ListFirst(IConnectinContext context, Expression expression, string OrderBy) {
            return EntityBase.OnListFirst<OrdersByEmployee>(context, OrdersByEmployee.mSelectString, expression, OrderBy, OrdersByEmployee.mGroupString);
        }
        
        public static OrdersByEmployee ListFirst(IConnectinContext context, Expression expression) {
            return OrdersByEmployee.ListFirst(context, expression);
        }
        
        public static OrdersByEmployee ListFirst(Expression expression, string OrderBy) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.ListFirst(_context, expression, OrderBy);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        public static OrdersByEmployee ListFirst(Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.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, " orders o inner join employees e on o.employeeid=e.employeeid", expression, OrdersByEmployee.mGroupString);
        }
        
        public static int Count(Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.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, " orders o inner join employees e on o.employeeid=e.employeeid", "AVG", field, DISTINCT, expression, OrdersByEmployee.mGroupString);
        }
        
        public static object AVG(IConnectinContext context, string field, Expression expression) {
            return OrdersByEmployee.AVG(context, field, false, expression);
        }
        
        public static object AVG(IConnectinContext context, string field) {
            return OrdersByEmployee.AVG(context, field, false, null);
        }
        
        public static object AVG(IConnectinContext context, string field, bool DISTINCT) {
            return OrdersByEmployee.AVG(context, field, DISTINCT, null);
        }
        
        public static object AVG(string field, bool DISTINCT, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.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 OrdersByEmployee.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 OrdersByEmployee.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 OrdersByEmployee.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, " orders o inner join employees e on o.employeeid=e.employeeid", "SUM", field, DISTINCT, expression, OrdersByEmployee.mGroupString);
        }
        
        public static object SUM(IConnectinContext context, string field, Expression expression) {
            return OrdersByEmployee.SUM(context, field, false, expression);
        }
        
        public static object SUM(IConnectinContext context, string field) {
            return OrdersByEmployee.SUM(context, field, false, null);
        }
        
        public static object SUM(IConnectinContext context, string field, bool DISTINCT) {
            return OrdersByEmployee.SUM(context, field, DISTINCT, null);
        }
        
        public static object SUM(string field, bool DISTINCT, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.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 OrdersByEmployee.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 OrdersByEmployee.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 OrdersByEmployee.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, " orders o inner join employees e on o.employeeid=e.employeeid", "MAX", field, false, expression, OrdersByEmployee.mGroupString);
        }
        
        public static object MAX(IConnectinContext context, string field) {
            return OrdersByEmployee.MAX(context, field, null);
        }
        
        public static object MAX(string field, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.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 OrdersByEmployee.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, " orders o inner join employees e on o.employeeid=e.employeeid", "MIN", field, false, expression, OrdersByEmployee.mGroupString);
        }
        
        public static object MIN(IConnectinContext context, string field) {
            return OrdersByEmployee.MIN(context, field, null);
        }
        
        public static object MIN(string field, Expression expression) {
            IConnectinContext _context;
            _context = DBContext.Context;
            try {
                return OrdersByEmployee.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 OrdersByEmployee.MIN(_context, field, null);
            }
            catch (System.Exception e_) {
                throw e_;
            }
            finally {
                _context.Dispose();
            }
        }
        
        protected override void OnLoadData(System.Data.IDataReader reader) {
            if ((reader["_Orders"] != System.DBNull.Value)) {
                this.Orders = ((int)(this.Convert(typeof(int), reader["_Orders"])));
            }
            if ((reader["_EmployeeID"] != System.DBNull.Value)) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -