コード例 #1
0
 public int DeleteUserOrgnazation(UserOrgnazationModel uomodel)
 {
     if (uomodel == null)
     {
         throw new AggregateException("uomodel");
     }
     using (var dbcontextscope = _dbContextScopeFactory.Create())
     {
         var db = dbcontextscope.DbContexts.Get <OADbContext>();
         return(Repository.Delete <UserOrgnazationModel>(db, uomodel));
     }
 }
コード例 #2
0
 public int AddUserOrgnazation(UserOrgnazationModel uomodel)
 {
     if (uomodel == null)
     {
         throw new ArgumentNullException("uomodel");
     }
     using (var dbcontextscope = _dbContextScopeFactory.Create())
     {
         var db = dbcontextscope.DbContexts.Get <OADbContext>();
         return(Repository.Add <UserOrgnazationModel>(db, uomodel));
     }
 }