public Rec_RelativeModel GetById(Guid id) { string status = string.Empty; var model = new Rec_RelativeModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Rec_RelativeEntity>(id, ConstantSql.hrm_rec_sp_get_RelativeById, ref status);//note if (entity != null) { model = entity.CopyData <Rec_RelativeModel>(); } model.ActionStatus = status; return(model); }
public Rec_RelativeModel Post([Bind] Rec_RelativeModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Rec_RelativeModel>(model, "Rec_Relative", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Rec_RelativeEntity, Rec_RelativeModel>(model)); }