public bool UpdateVillage(int Id, TB_M_Village village) { var Get = get(Id); if (Get != null) { Get.Name = village.Name; Get.CreateDate = DateTimeOffset.Now.ToLocalTime(); myContext.Entry(Get).State = EntityState.Modified; return(savedata.Save(myContext)); } else { status = false; } return(status); }
public bool Update(int id, TB_M_Village item) { throw new NotImplementedException(); }
public bool Insert(TB_M_Village item) { throw new NotImplementedException(); }
public bool InsertVillage(TB_M_Village village) { village.CreateDate = DateTimeOffset.Now.ToLocalTime(); myContext.TB_M_Villages.Add(village); return(savedata.Save(myContext)); }