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