public void Update(ProfileCompanyRequest model)
 {
     DataProvider.ExecuteNonQuery("dbo.Profile_UpdateCompany"
                                  , inputParamMapper : delegate(SqlParameterCollection paramCollection)
     {
         paramCollection.AddWithValue("@UserId", model.UserId);
         paramCollection.AddWithValue("@ModifiedBy", model.ModifiedBy);
         paramCollection.AddWithValue("@CompanyName", model.CompanyName);
         paramCollection.AddWithValue("@CompanyUrl", model.CompanyUrl);
         paramCollection.AddWithValue("@CompanyLogoUrl", model.CompanyLogoUrl);
     });
 }
Beispiel #2
0
 public HttpResponseMessage UpdateProfileCompany(ProfileCompanyRequest model)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
         }
         _profileCompanyService.Update(model);
         return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse()));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }