Beispiel #1
0
        public async Task <IActionResult> PutFoci(int id, data.Foci foci)
        {
            if (id != foci.FocusId)
            {
                return(BadRequest());
            }

            try
            {
                new Solution.BS.Foci(_context).Update(foci);
            }
            catch (Exception ee)
            {
                if (!FociExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Beispiel #2
0
        public async Task <ActionResult <data.Foci> > PostFoci(data.Foci foci)
        {
            new Solution.BS.Foci(_context).Insert(foci);

            return(CreatedAtAction("GetFoci", new { id = foci.FocusId }, foci));
        }