public async Task <ObjectResult> CreateBussinessProperty(Property property) { if (!ModelState.IsValid) { return(new BadRequestObjectResult(ModelState)); } var Result = await repository.CreateBussinessProperty(property); if (!Result) { return(new ObjectResult("Database error") { StatusCode = 500 }); } return(new CreatedResult("FindConsumerProperty", new { id = property.id })); }