示例#1
0
 public int Update(LiveMedsEntity.Admin admin)
 {
     LiveMedsEntity.Admin ad = this.context.Admins.SingleOrDefault(a => a.AdminId == admin.AdminId);
     ad.AdminName     = admin.AdminName;
     ad.AdminUserName = admin.AdminUserName;
     ad.AdminEmail    = admin.AdminEmail;
     ad.AdminPassword = admin.AdminPassword;
     return(this.context.SaveChanges());
 }
示例#2
0
 public int Delete(int id)
 {
     LiveMedsEntity.Admin ad = this.context.Admins.SingleOrDefault(a => a.AdminId == id);
     this.context.Admins.Remove(ad);
     return(this.context.SaveChanges());
 }
示例#3
0
 public int Update(LiveMedsEntity.Admin admin)
 {
     return(this.data.Update(admin));
 }
示例#4
0
 public int Insert(LiveMedsEntity.Admin admin)
 {
     this.context.Admins.Add(admin);
     return(this.context.SaveChanges());
 }
示例#5
0
 public int Insert(LiveMedsEntity.Admin admin)
 {
     return(this.data.Insert(admin));
 }