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