Ejemplo n.º 1
0
        public IActionResult Update(long id, [FromBody] MenueDetail menuedetail)
        {
            ObjectResult result = null;

            try
            {
                if (menuedetail.Save() == 1)
                {
                    result = new ObjectResult(new { success = true, message = "ok", menuedetail = menuedetail })
                    {
                        StatusCode = (int)HttpStatusCode.OK
                    }
                }
                ;
                else
                {
                    result = new ObjectResult(new { success = false, message = "menuedetail not saved", menmenuedetailue = menuedetail })
                    {
                        StatusCode = (int)HttpStatusCode.NotModified
                    }
                };
            }
            catch (Exception ex)
            {
#if DEBUG
                result = new ObjectResult(new { success = false, message = ex.Message })
                {
                    StatusCode = (int)HttpStatusCode.NotModified
                };
#else
                result = new ObjectResult(new { success = false, message = "Fehler beim Speichern!" })
                {
                    StatusCode = (int)HttpStatusCode.NotModified
                };
#endif
            }

            return(result);
        }
Ejemplo n.º 2
0
 public dynamic Check(int id) => MenueDetail.Get(id);
Ejemplo n.º 3
0
 public IEnumerable <MenueDetail> Select() => MenueDetail.GetList();