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