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()); }
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()); }
public int Update(LiveMedsEntity.Admin admin) { return(this.data.Update(admin)); }
public int Insert(LiveMedsEntity.Admin admin) { this.context.Admins.Add(admin); return(this.context.SaveChanges()); }
public int Insert(LiveMedsEntity.Admin admin) { return(this.data.Insert(admin)); }