public async Task <IActionResult> AddCoownerAsync([FromBody] RestaurantCoownerModel model) { if (!ModelState.IsValid) { return(StatusCode((int)HttpStatusCode.InternalServerError, GetErrorList(ModelState))); } EmployersRestaurants result; try { People currentUser = this.GetCurrentUser(); result = await Service.AddCoownerAsync( currentUser.ThePersonAsEmployer.Id, model.RestaurantId, model.EmployerId); } catch (Exception ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, GetErrorList(ex))); } return(Ok(result)); }