public static SalaryAllowanceModel Create(SalaryAllowanceModel model) { var entity = new sal_SalaryAllowance(); model.FillEntity(ref entity); return(new SalaryAllowanceModel(sal_SalaryAllowanceServices.Create(entity))); }
public static SalaryAllowanceModel Update(SalaryAllowanceModel model) { var entity = sal_SalaryAllowanceServices.GetById(model.Id); if (entity == null) { return(null); } model.EditedDate = DateTime.Now; model.FillEntity(ref entity); return(new SalaryAllowanceModel(sal_SalaryAllowanceServices.Update(entity))); }