public ResponseEntity <ResponseData <object> > Post([FromForm] PostRequest request) { _stackService.Create(RequestMapperService.MapToEntity(request, DateTime.Now, 1)); var responseEntityBuilder = new ResponseEntityBuilder <object> { ResponseStatusCode = HttpStatusCode.Created }; return(responseEntityBuilder.Build()); }
public ResponseEntity <ResponseData <object> > Post([FromForm] CompanyCompositePostRequest compositeRequest) { var now = DateTime.Now; _companyService.Create( RequestMapperService.MapToEntity(compositeRequest.Company, now, 1), RequestMapperService.MapToEntity(compositeRequest.Address, now, 1) ); var responseEntityBuilder = new ResponseEntityBuilder <object>() { ResponseStatusCode = HttpStatusCode.Created }; return(responseEntityBuilder.Build()); }