public virtual ActionResult <TEntityResponse> Post([FromBody] TEntityRequest resource) { if (!ModelState.IsValid) { return(BadRequest(Errors(resource))); } var mapped = Mapper.Map <TEntity>(resource); var entity = Service.Add(mapped); if (Notificator.HasErrors()) { return(BadRequest(Errors(resource))); } return(Created(string.Empty, Mapper.Map <TEntityResponse>(entity))); }