Exemplo n.º 1
0
        public async Task <bool> Put(Menu model)
        {
            var result = false;

            if (ModelState.IsValid)
            {
                result = await _menuBusiness.Update(model);
            }
            return(result);
        }
Exemplo n.º 2
0
 public HttpResponseMessage Update(MenuViewModel menuViewModel)
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, m_MenuBusiness.Update(menuViewModel)));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest,
                                            string.Format("Error:{0}!", ex.Message)));
     }
 }