ORM Study 2 - Entity

using System;
using System.IO;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.FormManager
{
    [Serializable]
    [Table(Name = "OA_T_OrderForm")]
    public class OrderForm
    {
        private string _attachmentName = null;
        private string _attachmentUrl = null;
        private DateTime _completeTime = DateTime.Now;
        private string _correlationCompany = null;
        private DateTime _createFormDate = DateTime.Now;
        private string _createUserID = null;
        private string _joinUserXML = null;
        private string _orderContent = null;
        private DateTime _orderFormDate = DateTime.Now;
        private string _orderFormID = null;
        private string _orderFormNo = null;
        private int _orderFormOrder = 0;
        private string _projectID = null;
        private int _urgencyDegree = 0;

        [Column]
        public string AttachmentName
        {
            get
            {
                return this._attachmentName;
            }
            set
            {
                this._attachmentName = value;
            }
        }

        public string AttachmentURL
        {
            get
            {
                return this._attachmentUrl;
            }
            set
            {
                this._attachmentUrl = value;
                this.AttachmentName = Path.GetFileName(this._attachmentUrl);
            }
        }

        [Column]
        public DateTime CompleteTime
        {
            get
            {
                return this._completeTime;
            }
            set
            {
                this._completeTime = value;
            }
        }

        [Column]
        public string CorrelationCompany
        {
            get
            {
                return this._correlationCompany;
            }
            set
            {
                this._correlationCompany = value;
            }
        }

        [Column]
        public DateTime CreateFormDate
        {
            get
            {
                return this._createFormDate;
            }
            set
            {
                this._createFormDate = value;
            }
        }

        [Column]
        public string CreateUserID
        {
            get
            {
                return this._createUserID;
            }
            set
            {
                this._createUserID = value;
            }
        }

        public string FormTypeID
        {
            get
            {
                return "21";
            }
        }

        [Column]
        public string JoinUserXML
        {
            get
            {
                return this._joinUserXML;
            }
            set
            {
                this._joinUserXML = value;
            }
        }

        [Column]
        public string OrderContent
        {
            get
            {
                return this._orderContent;
            }
            set
            {
                this._orderContent = value;
            }
        }

        [Column]
        public DateTime OrderFormDate
        {
            get
            {
                return this._orderFormDate;
            }
            set
            {
                this._orderFormDate = value;
            }
        }

        [Id]
        public string OrderFormID
        {
            get
            {
                return this._orderFormID;
            }
            set
            {
                this._orderFormID = value;
            }
        }

        [Column]
        public string OrderFormNo
        {
            get
            {
                return this._orderFormNo;
            }
            set
            {
                this._orderFormNo = value;
            }
        }

        [Column]
        public int OrderFormOrder
        {
            get
            {
                return this._orderFormOrder;
            }
            set
            {
                this._orderFormOrder = value;
            }
        }

        [Column]
        public string ProjectID
        {
            get
            {
                return this._projectID;
            }
            set
            {
                this._projectID = value;
            }
        }

        [Column]
        public int UrgencyDegree
        {
            get
            {
                return this._urgencyDegree;
            }
            set
            {
                this._urgencyDegree = value;
            }
        }
    }
}

using System;
using System.IO;
using Entity.FormManager;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.FormManager
{
    [Serializable]
    [Table(Name = "OA_T_WorkManeuveForm")]
    public class WorkManeuveForm
    {
        private string _attachmentName = null;
        private string _attachmentUrl = null;
        private DateTime _completeTime = DateTime.Now;
        private string _correlationCompany = null;
        private DateTime _createFormDate = DateTime.Now;
        private string _createUserID = null;
        private string _joinUserXML = null;
        private string _maneuveContent = null;
        private DateTime _maneuveFormDate = DateTime.Now;
        private string _maneuveFormID = null;
        private string _maneuveFormNo = null;
        private int _maneuveFormOrder = 0;
        private string _projectID = null;
        private int _urgencyDegree = 0;

        [Column]
        public string AttachmentName
        {
            get
            {
                return this._attachmentName;
            }
            set
            {
                this._attachmentName = value;
            }
        }

        public string AttachmentURL
        {
            get
            {
                return this._attachmentUrl;
            }
            set
            {
                this._attachmentUrl = value;
                this.AttachmentName = Path.GetFileName(this._attachmentUrl);
            }
        }

        [Column]
        public DateTime CompleteTime
        {
            get
            {
                return this._completeTime;
            }
            set
            {
                this._completeTime = value;
            }
        }

        [Column]
        public string CorrelationCompany
        {
            get
            {
                return this._correlationCompany;
            }
            set
            {
                this._correlationCompany = value;
            }
        }

        [Column]
        public DateTime CreateFormDate
        {
            get
            {
                return this._createFormDate;
            }
            set
            {
                this._createFormDate = value;
            }
        }

        [Column]
        public string CreateUserID
        {
            get
            {
                return this._createUserID;
            }
            set
            {
                this._createUserID = value;
            }
        }

        public string FormTypeID
        {
            get
            {
                return "22";
            }
        }

        [Column]
        public string JoinUserXML
        {
            get
            {
                return this._joinUserXML;
            }
            set
            {
                this._joinUserXML = value;
            }
        }

        [Column]
        public string ManeuveContent
        {
            get
            {
                return this._maneuveContent;
            }
            set
            {
                this._maneuveContent = value;
            }
        }

        [Column]
        public DateTime ManeuveFormDate
        {
            get
            {
                return this._maneuveFormDate;
            }
            set
            {
                this._maneuveFormDate = value;
            }
        }

        [Id(Name = "ManeuveFormID")]
        public string ManeuveFormID
        {
            get
            {
                return this._maneuveFormID;
            }
            set
            {
                this._maneuveFormID = value;
            }
        }

        [Column]
        public string ManeuveFormNo
        {
            get
            {
                return this._maneuveFormNo;
            }
            set
            {
                this._maneuveFormNo = value;
            }
        }

        [Column]
        public int ManeuveFormOrder
        {
            get
            {
                return this._maneuveFormOrder;
            }
            set
            {
                this._maneuveFormOrder = value;
            }
        }

        [Column]
        public string ProjectID
        {
            get
            {
                return this._projectID;
            }
            set
            {
                this._projectID = value;
            }
        }

        [Column]
        public int UrgencyDegree
        {
            get
            {
                return this._urgencyDegree;
            }
            set
            {
                this._urgencyDegree = value;
            }
        }
    }
}

using System;
using System.IO;
using System.Collections;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.TimeCardManager
{
    [Serializable]
    [Table(Name = "OA_T_BeLateMonthRPT")]
    public class LateInfo
    {
        private string _bLMonthRPTID = null;
        private IList _detailList = null;
        private string _rPTAuditDate = null;
        private string _rPTAuditUser = null;
        private string _rPTCreateDate = null;
        private string _rPTCreateUser = null;
        private string _rPTMonth = null;
        private LateStatStatus _rPTStatus = LateStatStatus.NotAudit;
        private string _rPTYear = null;

        [Id]
        public string BLMonthRPTID
        {
            get
            {
                return this._bLMonthRPTID;
            }
            set
            {
                this._bLMonthRPTID = value;
            }
        }

        public IList DetailList
        {
            get
            {
                return this._detailList;
            }
            set
            {
                this._detailList = value;
            }
        }

        [Column]
        public string RPTAuditDate
        {
            get
            {
                return this._rPTAuditDate;
            }
            set
            {
                this._rPTAuditDate = value;
            }
        }

        [Column]
        public string RPTAuditUser
        {
            get
            {
                return this._rPTAuditUser;
            }
            set
            {
                this._rPTAuditUser = value;
            }
        }

        [Column]
        public string RPTCreateDate
        {
            get
            {
                return this._rPTCreateDate;
            }
            set
            {
                this._rPTCreateDate = value;
            }
        }

        [Column]
        public string RPTCreateUser
        {
            get
            {
                return this._rPTCreateUser;
            }
            set
            {
                this._rPTCreateUser = value;
            }
        }

        [Column]
        public string RPTMonth
        {
            get
            {
                return this._rPTMonth;
            }
            set
            {
                this._rPTMonth = value;
            }
        }

        [Column]
        public LateStatStatus RPTStatus
        {
            get
            {
                return this._rPTStatus;
            }
            set
            {
                this._rPTStatus = value;
            }
        }

        [Column]
        public string RPTYear
        {
            get
            {
                return this._rPTYear;
            }
            set
            {
                this._rPTYear = value;
            }
        }
    }
}

using System;
using System.IO;
using System.Collections;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.TimeCardManager
{
    [Serializable]
    [Table(Name = "OA_T_BeLateMonthRPT")]
    public class LateInfoDetail
    {
        private string _bLMonthRPTID = null;
        private double _bLNumberONFifteen = 0.0;
        private double _bLNumberOutFifteen = 0.0;
        private double _bLNumberTotal = 0.0;
        private double _bLTimeONFifteen = 0.0;
        private double _bLTimeOutFifteen = 0.0;
        private double _bLTimeTotal = 0.0;
        private string _detailID = null;
        private short _isSendWarning = 0;
        private short _sendWarningStatus = 0;
        private string _unitName = null;
        private string _userID = null;
        private string _userName = null;
        private double _workDays = 0.0;

        [Column]
        public string BLMonthRPTID
        {
            get
            {
                return this._bLMonthRPTID;
            }
            set
            {
                this._bLMonthRPTID = value;
            }
        }

        [Column]
        public double BLNumberONFifteen
        {
            get
            {
                return this._bLNumberONFifteen;
            }
            set
            {
                this._bLNumberONFifteen = value;
            }
        }

        [Column]
        public double BLNumberOutFifteen
        {
            get
            {
                return this._bLNumberOutFifteen;
            }
            set
            {
                this._bLNumberOutFifteen = value;
            }
        }

        [Column]
        public double BLNumberTotal
        {
            get
            {
                return this._bLNumberTotal;
            }
            set
            {
                this._bLNumberTotal = value;
            }
        }

        [Column]
        public double BLTimeONFifteen
        {
            get
            {
                return this._bLTimeONFifteen;
            }
            set
            {
                this._bLTimeONFifteen = value;
            }
        }

        [Column]
        public double BLTimeOutFifteen
        {
            get
            {
                return this._bLTimeOutFifteen;
            }
            set
            {
                this._bLTimeOutFifteen = value;
            }
        }

        [Column]
        public double BLTimeTotal
        {
            get
            {
                return this._bLTimeTotal;
            }
            set
            {
                this._bLTimeTotal = value;
            }
        }

        [Id]
        public string DetailID
        {
            get
            {
                return this._detailID;
            }
            set
            {
                this._detailID = value;
            }
        }

        [Column]
        public short isSendWarning
        {
            get
            {
                return this._isSendWarning;
            }
            set
            {
                this._isSendWarning = value;
            }
        }

        [Column]
        public short SendWarningStatus
        {
            get
            {
                return this._sendWarningStatus;
            }
            set
            {
                this._sendWarningStatus = value;
            }
        }

        [Column]
        public string UnitName
        {
            get
            {
                return this._unitName;
            }
            set
            {
                this._unitName = value;
            }
        }

        [Column]
        public string UserID
        {
            get
            {
                return this._userID;
            }
            set
            {
                this._userID = value;
            }
        }

        [Column]
        public string UserName
        {
            get
            {
                return this._userName;
            }
            set
            {
                this._userName = value;
            }
        }

        [Column]
        public double WorkDays
        {
            get
            {
                return this._workDays;
            }
            set
            {
                this._workDays = value;
            }
        }
    }
}

using System;
using System.IO;
using System.Collections;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.TimeCardManager
{
    [Serializable]
    [Table(Name = "OA_T_OvertimeMonthRPT")]
    public class OverTimeInfo
    {
        private IList _detailList = null;
        private string _oTMonthRPTID = null;
        private string _rPTAuditDate = null;
        private string _rPTAuditUser = null;
        private string _rPTCreateDate = null;
        private string _rPTCreateUser = null;
        private string _rPTEndDate = null;
        private string _rPTMonth = null;
        private OverTimeStatStatus _rPTStatus = OverTimeStatStatus.NotAudit;
        private string _rPTYear = null;

        public IList DetailList
        {
            get
            {
                return this._detailList;
            }
            set
            {
                this._detailList = value;
            }
        }

        [Id]
        public string OTMonthRPTID
        {
            get
            {
                return this._oTMonthRPTID;
            }
            set
            {
                this._oTMonthRPTID = value;
            }
        }

        [Column]
        public string RPTAuditDate
        {
            get
            {
                return this._rPTAuditDate;
            }
            set
            {
                this._rPTAuditDate = value;
            }
        }

        [Column]
        public string RPTAuditUser
        {
            get
            {
                return this._rPTAuditUser;
            }
            set
            {
                this._rPTAuditUser = value;
            }
        }

        [Column]
        public string RPTCreateDate
        {
            get
            {
                return this._rPTCreateDate;
            }
            set
            {
                this._rPTCreateDate = value;
            }
        }

        [Column]
        public string RPTCreateUser
        {
            get
            {
                return this._rPTCreateUser;
            }
            set
            {
                this._rPTCreateUser = value;
            }
        }

        [Column]
        public string RPTEndDate
        {
            get
            {
                return this._rPTEndDate;
            }
            set
            {
                this._rPTEndDate = value;
            }
        }

        [Column]
        public string RPTMonth
        {
            get
            {
                return this._rPTMonth;
            }
            set
            {
                this._rPTMonth = value;
            }
        }

        [Column]
        public OverTimeStatStatus RPTStatus
        {
            get
            {
                return this._rPTStatus;
            }
            set
            {
                this._rPTStatus = value;
            }
        }

        [Column]
        public string RPTYear
        {
            get
            {
                return this._rPTYear;
            }
            set
            {
                this._rPTYear = value;
            }
        }
    }
}

using System;
using System.IO;
using System.Collections;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.TimeCardManager
{
    [Serializable]
    [Table(Name = "OA_T_OvertimeMonthRPTDetail")]
    public class OverTimeInfoDetail
    {
        private string _detailID = null;
        private double _furloughTimeTotal = 0.0;
        private double _lastOTTime = 0.0;
        private double _leaveOTTime = 0.0;
        private string _oTMonthRPTID = null;
        private double _oTTimeTotal = 0.0;
        private double _returnMoneyTime = 0.0;
        private string _unitName = null;
        private string _userID = null;
        private string _userName = null;

        [Id]
        public string DetailID
        {
            get
            {
                return this._detailID;
            }
            set
            {
                this._detailID = value;
            }
        }

        [Column]
        public double FurloughTimeTotal
        {
            get
            {
                return this._furloughTimeTotal;
            }
            set
            {
                this._furloughTimeTotal = value;
            }
        }

        [Column]
        public double LastOTTime
        {
            get
            {
                return this._lastOTTime;
            }
            set
            {
                this._lastOTTime = value;
            }
        }

        [Column]
        public double LeaveOTTime
        {
            get
            {
                return this._leaveOTTime;
            }
            set
            {
                this._leaveOTTime = value;
            }
        }

        [Column]
        public string OTMonthRPTID
        {
            get
            {
                return this._oTMonthRPTID;
            }
            set
            {
                this._oTMonthRPTID = value;
            }
        }

        [Column]
        public double OTTimeTotal
        {
            get
            {
                return this._oTTimeTotal;
            }
            set
            {
                this._oTTimeTotal = value;
            }
        }

        [Column]
        public double ReturnMoneyTime
        {
            get
            {
                return this._returnMoneyTime;
            }
            set
            {
                this._returnMoneyTime = value;
            }
        }

        [Column]
        public string UnitName
        {
            get
            {
                return this._unitName;
            }
            set
            {
                this._unitName = value;
            }
        }

        [Column]
        public string UserID
        {
            get
            {
                return this._userID;
            }
            set
            {
                this._userID = value;
            }
        }

        [Column]
        public string UserName
        {
            get
            {
                return this._userName;
            }
            set
            {
                this._userName = value;
            }
        }
    }
}

using System;
using System.IO;
using Global.Utils.ORM.CustomAttributes;

namespace Entity.TimeCardManager
{
    [Serializable]
    [Table(Name = "OA_YearFurlough")]
    public class YearFurlough
    {
        private string _pFEndDate = string.Empty;
        private string _pFMount = string.Empty;
        private string _pFStartDate = string.Empty;
        private string _surplusMount = string.Empty;
        private string _tFEndDate = string.Empty;
        private string _tFMount = string.Empty;
        private string _tFStartDate = string.Empty;
        private string _unitName = string.Empty;
        private string _userID = string.Empty;
        private string _userName = string.Empty;
        private string _yearWord = string.Empty;
        private DateTime _yFEditDate = DateTime.Now;
        private string _yFEditUserID = string.Empty;
        private string _yFID = string.Empty;

        [Column]
        public string PFEndDate
        {
            get
            {
                return this._pFEndDate;
            }
            set
            {
                this._pFEndDate = value;
            }
        }

        [Column]
        public string PFMount
        {
            get
            {
                return this._pFMount;
            }
            set
            {
                this._pFMount = value;
            }
        }

        [Column]
        public string PFStartDate
        {
            get
            {
                return this._pFStartDate;
            }
            set
            {
                this._pFStartDate = value;
            }
        }

        [Column]
        public string SurplusMount
        {
            get
            {
                return this._surplusMount;
            }
            set
            {
                this._surplusMount = value;
            }
        }

        [Column]
        public string TFEndDate
        {
            get
            {
                return this._tFEndDate;
            }
            set
            {
                this._tFEndDate = value;
            }
        }

        [Column]
        public string TFMount
        {
            get
            {
                return this._tFMount;
            }
            set
            {
                this._tFMount = value;
            }
        }

        [Column]
        public string TFStartDate
        {
            get
            {
                return this._tFStartDate;
            }
            set
            {
                this._tFStartDate = value;
            }
        }

        [Column]
        public string UnitName
        {
            get
            {
                return this._unitName;
            }
            set
            {
                this._unitName = value;
            }
        }

        [Column]
        public string UserID
        {
            get
            {
                return this._userID;
            }
            set
            {
                this._userID = value;
            }
        }

        [Column]
        public string UserName
        {
            get
            {
                return this._userName;
            }
            set
            {
                this._userName = value;
            }
        }

        [Column]
        public string YearWord
        {
            get
            {
                return this._yearWord;
            }
            set
            {
                this._yearWord = value;
            }
        }

        [Column]
        public DateTime YFEditDate
        {
            get
            {
                return this._yFEditDate;
            }
            set
            {
                this._yFEditDate = value;
            }
        }

        [Column]
        public string YFEditUserID
        {
            get
            {
                return this._yFEditUserID;
            }
            set
            {
                this._yFEditUserID = value;
            }
        }

        [Id]
        public string YFID
        {
            get
            {
                return this._yFID;
            }
            set
            {
                this._yFID = value;
            }
        }
    }
}

using System;
using Global.Utils.ORM.CustomAttributes;

namespace Entity
{
    [Serializable]
    [Table(Name = "OA_F_HistroyAccounts")]
    public class HistoryAccounts
    {
        private DateTime _endDate = DateTime.Now;
        private decimal _finnalIncome = 0M;
        private decimal _finnalOutput = 0M;
        private int _historyAccountsID = 0;
        private decimal _initialIncome = 0M;
        private decimal _initialOutput = 0M;
        private DateTime _startDate = DateTime.Now;

        [Column]
        public DateTime EndDate
        {
            get
            {
                return this._endDate;
            }
            set
            {
                this._endDate = value;
            }
        }

        [Column]
        public decimal FinnalIncome
        {
            get
            {
                return this._finnalIncome;
            }
            set
            {
                this._finnalIncome = value;
            }
        }

        [Column]
        public decimal FinnalOutput
        {
            get
            {
                return this._finnalOutput;
            }
            set
            {
                this._finnalOutput = value;
            }
        }

        [Id(Strategy = GenerationType.INDENTITY)]
        public int HistoryAccountsID
        {
            get
            {
                return this._historyAccountsID;
            }
            set
            {
                this._historyAccountsID = value;
            }
        }

        [Column]
        public decimal InitialIncome
        {
            get
            {
                return this._initialIncome;
            }
            set
            {
                this._initialIncome = value;
            }
        }

        [Column]
        public decimal InitialOutput
        {
            get
            {
                return this._initialOutput;
            }
            set
            {
                this._initialOutput = value;
            }
        }

        [Column]
        public DateTime StartDate
        {
            get
            {
                return this._startDate;
            }
            set
            {
                this._startDate = value;
            }
        }
    }
}

using System;
using Global.Utils.ORM.CustomAttributes;

namespace Entity
{
    [Serializable]
    [Table(Name = "OA_Project_ChargeUp")]
    public class ChargeUpInfo
    {
        private string _account = null;
        private DateTime _chargeUpDate = DateTime.Now;
        private int _chargeUpID = 0;
        private string _company = null;
        private string _currency = null;
        private string _description = null;
        private string _endUpDate;
        private string _formNo = null;
        private string _formType = null;
        private string _fund = null;
        private decimal _income = 0M;
        private decimal _outputMoney = 0M;
        private string _startDate;
        private string _userID = null;

        [Column]
        public string Account
        {
            get
            {
                return this._account;
            }
            set
            {
                this._account = value;
            }
        }

        [Column]
        public DateTime ChargeUpDate
        {
            get
            {
                return this._chargeUpDate;
            }
            set
            {
                this._chargeUpDate = value;
            }
        }

        [Id(Strategy = GenerationType.INDENTITY)]
        public int ChargeUpID
        {
            get
            {
                return this._chargeUpID;
            }
            set
            {
                this._chargeUpID = value;
            }
        }

        [Column]
        public string Company
        {
            get
            {
                return this._company;
            }
            set
            {
                this._company = value;
            }
        }

        [Column]
        public string Currency
        {
            get
            {
                return this._currency;
            }
            set
            {
                this._currency = value;
            }
        }

        [Column]
        public string Description
        {
            get
            {
                return this._description;
            }
            set
            {
                this._description = value;
            }
        }

        [Column]
        public string EndDate
        {
            get
            {
                return this._endUpDate;
            }
            set
            {
                this._endUpDate = value;
            }
        }

        [Column]
        public string FormNo
        {
            get
            {
                return this._formNo;
            }
            set
            {
                this._formNo = value;
            }
        }

        [Column]
        public string FormType
        {
            get
            {
                return this._formType;
            }
            set
            {
                this._formType = value;
            }
        }

        [Column]
        public string Fund
        {
            get
            {
                return this._fund;
            }
            set
            {
                this._fund = value;
            }
        }

        [Column]
        public decimal Income
        {
            get
            {
                return this._income;
            }
            set
            {
                this._income = value;
            }
        }

        [Column]
        public decimal OutputMoney
        {
            get
            {
                return this._outputMoney;
            }
            set
            {
                this._outputMoney = value;
            }
        }

        [Column]
        public string StartDate
        {
            get
            {
                return this._startDate;
            }
            set
            {
                this._startDate = value;
            }
        }

        [Column]
        public string UserID
        {
            get
            {
                return this._userID;
            }
            set
            {
                this._userID = value;
            }
        }
    }
}

Attributes in Visual Designer

Add .NET or custom attributes to any persistent property or persistent class in your Domain Model so it becomes a part of the regular code generation. You’ll never again have to add code manually.

Use either a convenient Visual Designer dialog for a single attribute placement or a powerful Model Operation to generate attributes for multiple classes or properties at the same time.

Bulk Select Based on a List of Keys

The new GetObjectsByKeys method will enable you to select multiple objects of the same type with a single batch, using the identity of the type as a key. This compares to callingGetObjectByKeys numerous times. It can yield significantly better performance, depending on the number of retrieved objects.

Oracle Managed Driver Support

Responding to your many requests in our Ideas & Feedback Portal, Telerik Data Access is now compatible and tested with the ODP.NET Managed Driver, and you can choose to use it in your Oracle-based data layers. It offers a simplified deployment scenario with just one assembly, side by side with other versions of ODP.NET.

ORM Study 2 - Entity

时间: 2024-10-08 23:57:23

ORM Study 2 - Entity的相关文章

推荐一个 可以和 Entity Framework 媲美 的 国人 写的 ORM

https://github.com/2881099/FreeSql 扶摇直上,至强ORM只为自由编码:鹏程万里,至简Linq可使保留黑发:横批:FreeSql(诗人:Coder) 即兴赋诗一首 ----------------------------- 以上是   作者 在 QQ 群 里 发的 原文,,, FreeSql 这个  ORM  (其实 作者 说 也不是 ORM) 从 技术 和 工作量 上来说 是 可以和  Entity Framework  相比 的, 而 它 的 牛逼 之处 在于

ORM框架详解

.Net开源微型ORM框架测评 什么是ORM? 对象关系映射(英语:Object Relation Mapping,简称ORM,或O/RM,或O/R mapping),是一种程序技术,用于实现面向对象编程语言里不同类型系统的数据之间的转换.从效果上说,它其实是创建了一个可在编程语言里使用的"虚拟对象数据库". 一般的ORM包括以下四部分: 一个对持久类对象进行CRUD操作的API: 一个语言或API用来规定与类和类属性相关的查询: 一个规定MAPPING METADATA的工具: 一种

Entity Framework 全面教程详解(转)

目录 预备知识    2 LINQ技术 2 LINQ技术的基础 - C#3.0    2 自动属性    2 隐式类型    2 对象初始化器与集合初始化器    3 匿名类    3 扩展方法    4 Lambda表达式    4 .NET中的数据访问    4 DataSet方案    5 改进的的DataSet方案    5 手写代码通过ADO.NET2.0连接类与数据库交互    5 ORM – LINQ to SQL    6 深入了解Entity Framework    7 En

.Net开源微型ORM框架测评

什么是ORM? 对象关系映射(英语:Object Relation Mapping,简称ORM,或O/RM,或O/R mapping),是一种程序技术,用于实现面向对象编程语言里不同类型系统的数据之间的转换.从效果上说,它其实是创建了一个可在编程语言里使用的“虚拟对象数据库”. 一般的ORM包括以下四部分: 一个对持久类对象进行CRUD操作的API: 一个语言或API用来规定与类和类属性相关的查询: 一个规定MAPPING METADATA的工具: 一种技术可以让ORM的实现同事务对象一起进行D

【转载】ADO.NET与ORM的比较(4):EntityFramework实现CRUD

[转载]ADO.NET与ORM的比较(4):EntityFramework实现CRUD 说明:个人感觉在Java领域大型开发都离不了ORM的身影,所谓的SSH就是Spring+Struts+Hibernate,除了在学习基础知识的时候被告知可以使用JDBC操作数据库之外,大量的书籍中都是讲述使用Hibernate这个ORM工具来操作数据.在.NET中操作数据库的方式有多种,除了最直接的方式就是使用ADO.NET之外,还可以使用NHibernate这个Hibernate在.NET中的实现ORM,如

Entity Framework介绍和DBFirst开发方式

一.ORM概念  什么是ORM? 对象关系映射(英语:(Object Relational Mapping,简称ORM,或O/RM,或O/R mapping),是一种程序技术.简单来说,就是将关系型数据库和实体对象进行映射的工具. 二.Entity Framework Entity Framework是微软官方提供的ORM工具. Entity Framework架构如下图: 实体数据模型EDM (Entity Data Model):将关系数据模型映射为实体数据模型,由三个部分组成,概念模型.存

实体框架(Entity Framework)

实体框架(Entity Framework) 实体框架(Entity Framework)简介 ADO.NET Entity Framework 是微软以 ADO.NET 为基础所发展出来的对象关系对应 (O/R Mapping) 解决方案,早期被称为 ObjectSpace,最新版本是EF6.0[CodeOnly功能得到了更好的支持] 实体框架Entity Framework 是 ADO.NET 中的一组支持开发面向数据的软件应用程序的技术.是微软的一个ORM框架. EF插入实体 步骤:定义要

记录一次BUG修复-Entity Framwork SaveChanges()失效

目录 一. 前言 二.问题背景 三.问题描述 四.问题解决步骤 六.总结 一. 前言 这是笔者在参与一个小型项目开发时所遇到的一个BUG,因为项目经验不足对Entity Framwork框架认识不足导致了这一BUG浪费了一天的时间,特此在这里记录.给自己一个警醒希望大家遇到相同问题能帮助到大家. 注:笔者水平有限,大家发现错误望批评指正. 二.问题背景 1.本次项目是一个ASP.NET MVC项目,因为项目比较小的关系,我们采用的是基本三层和仓储模式进行开发.2.使用的ORM框架是Entity

Go 中 ORM 的 Repository(仓储)模式

ORM 在业务开发中一直扮演着亦正亦邪的角色.很多人赞颂 ORM,认为 ORM 与面向对象的契合度让代码简洁有道.但是不少人厌恶它,因为 ORM 隐藏了太多的细节,埋下了超多的隐患.在 Go 中,我们也或多或少接触过 ORM,但是,在查阅不少业务代码后发现,ORM 使用起来颇为滑稽,并且"雷隐隐雾蒙蒙". 从 Entity Framework 谈起 Entity Framework 作为雄踞 Microsoft .NET Framework 以及 .NET Core 的杀手级 ORM