public HttpResponseMessage Update([FromBody] AccountView inst) { var t = new AccountValidationAttribute(); if (!(t.IsValid(inst))) { var resp = Request.CreateErrorResponse(HttpStatusCode.BadRequest, t.ErrorMessage); return(resp); } else { accountService.Update(inst.AccountFromViewToDomain()); HttpResponseMessage response = Request.CreateResponse <string>(HttpStatusCode.OK, "Account успешно обновлен!!"); return(response); } }
//[Route("")] public void Update([FromBody] AccountView inst) { accountService.Update(inst.AccountFromViewToDomain()); }