public Boolean Update(UserInfo record) { if (record == null) { return(false); } var attached = UserInfos.Attach(record); if (attached == null) { return(false); } Entry(attached).State = EntityState.Modified; return(SaveChanges() == 1); }
public Boolean Remove(UserInfo record) { if (record == null) { return(false); } var attached = UserInfos.Attach(record); if (attached == null) { return(false); } UserInfos.Remove(attached); return(SaveChanges() == 1); }