Пример #1
0
        public Diet PutDietInfo(int id, [FromBody] Diet diet)
        {
            _context.Entry(diet).State = EntityState.Modified;
            _context.SaveChanges();

            return(diet);
        }
Пример #2
0
        public Diet PostNewDiet([FromBody] Diet diet)
        {
            _context.dietEntries.Add(diet);
            _context.SaveChanges();

            return(diet);
        }