public Result Create(PageCreateAdminDto dto) { var result = _validatorCreate.ValidateResult(dto); if (!result.Success) { return(result); } var entity = Mapper.Map <Page>(dto); _pageRepository.Insert(entity); _unitOfWork.Commit(); result.Id = entity.Id; PageCacheManager.ClearCache(); return(result.SetSuccess(Messages.RecordSaved)); }
public IHttpActionResult Post([FromBody] PageCreateAdminDto dto) { return(Result(_pageAdminService.Create(dto))); }