コード例 #1
0
 public bool Update(LessonsInfo entity)
 {
     using (var _dbContext = new simpleDbContext())
     {
         _dbContext.LessonsInfo.AddOrUpdate(entity);
         return(_dbContext.SaveChanges() > 0);
     }
 }
コード例 #2
0
 public LessonsInfo Create(LessonsInfo entity)
 {
     using (var _dbContext = new simpleDbContext())
     {
         _dbContext.LessonsInfo.Add(entity);
         _dbContext.SaveChanges();
         return(entity);
     }
 }
コード例 #3
0
 public bool Update(LessonsInfo entity)
 {
     return(lessonsInfoDal.Update(entity));
 }
コード例 #4
0
 public LessonsInfo Create(LessonsInfo entity)
 {
     return(lessonsInfoDal.Create(entity));
 }