Пример #1
0
 public void Save(OMF.Common.ActivityLog.ActivityLog actLog)
 {
     using (Ef6.UnitOfWork unitOfWork = new Ef6.UnitOfWork((IDataContextAsync) new ActivityLogDbContext()))
     {
         unitOfWork.RepositoryAsync <OMF.Common.ActivityLog.ActivityLog>().InsertOrUpdateGraph(actLog);
         unitOfWork.SaveChanges();
     }
 }
Пример #2
0
        public async Task SaveAsync(ActivityLog actLog)
        {
            using (Ef6.UnitOfWork uow = new Ef6.UnitOfWork((IDataContextAsync) new ActivityLogDbContext()))
            {
                IRepositoryAsync <OMF.Common.ActivityLog.ActivityLog> rep = uow.RepositoryAsync <OMF.Common.ActivityLog.ActivityLog>();
                rep.InsertOrUpdateGraph(actLog);
                int num = await uow.SaveChangesAsync();

                rep = (IRepositoryAsync <OMF.Common.ActivityLog.ActivityLog>)null;
            }
        }