Exemple #1
0
        public HttpResponseMessage Update(TenantUpdateRequest tenantUpdateRequest)
        {
            if (tenantUpdateRequest == null)
            {
                ModelState.AddModelError("", "missing body data");
            }
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            tenantService.Update(tenantUpdateRequest);
            return(Request.CreateResponse(HttpStatusCode.OK));
        }
Exemple #2
0
 public void Update(TenantUpdateRequest request)
 {
     dataProvider.ExecuteNonQuery(
         "Tenant_Update",
         (parameters) =>
     {
         parameters.AddWithValue("@Id", request.Id);
         parameters.AddWithValue("@CompanyName", request.CompanyName);
         parameters.AddWithValue("@WebsiteUrl", request.WebsiteUrl);
         parameters.AddWithValue("@Description", request.Description);
         parameters.AddWithValue("@ImageUrl", request.ImageUrl);
         parameters.AddWithValue("@AppUserId", request.AppUserId);
     }
         );
 }