Пример #1
0
 public Repository2(IDbContext2 context, UnitOfWork2 ufw, int mid)
 {
     this.Context  = context;
     this.DbSet    = Context.Set <TEntity>();
     this.MemberId = mid;
     this.UFW      = ufw;
 }
Пример #2
0
        public void dddd()
        {
            var ufw = new ABMLib.DAL.LocalDB.UnitOfWork2(_Context, new DBContextHLog());

            var H = UFW.Repository <HLog>();

            var r = UFW.Repository <DBContext, QdtAction, QdtActionHLog>();

            //var r2 = UFW.Repository<RepQdtAction , QdtAction, long>();
            //var fff1 = r2.GetAll();
            //r2.Add(new QdtAction());
            r.Add(new QdtAction());
            H.Add(new HLog("ثبت داده QdtAction"));
            UFW.Save();
            //var fff2 = r2.GetAll();
            var it = r.GetEntityById(1);

            it.Name = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
            r.Add(it);
            UFW.Save();
            UFW.Dispose();
            //UFW.dIRep["RepQdtAction"].
        }