public ActionResult EditDistrict(DistrictViewModel model) { DistrictDAL sgdal = new DistrictDAL(); sgdal.Update(model.CastDB(model)); sgdal.AcceptAllChange(); return(GetBaseResponse <DistrictViewModel>(true)); }
public ActionResult CreateDistrict(DistrictViewModel model) { DistrictDAL sgdal = new DistrictDAL(); model.ID = Guid.NewGuid().ToString(); sgdal.Add(model.CastDB(model)); sgdal.AcceptAllChange(); return(GetBaseResponse <DistrictViewModel>(true)); }