/// <summary> /// /// </summary> /// <param name="obj"></param> public static InsuranceModel Insert(InsuranceModel model) { var entity = new hr_Insurance(); model.FillEntity(ref entity); return(new InsuranceModel(hr_InsuranceServices.Create(entity))); }
/// <summary> /// /// </summary> /// <param name="obj"></param> public static InsuranceModel Update(InsuranceModel model) { var entity = hr_InsuranceServices.GetById(model.Id); if (entity == null) { return(null); } model.FillEntity(ref entity); return(new InsuranceModel(hr_InsuranceServices.Update(entity))); }