public async Task <ActionResult <Foci> > PostFoci(Foci foci) { _context.Foci.Add(foci); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFoci", new { id = foci.FocusId }, foci)); }
public async Task <IActionResult> PutFoci(int id, Foci foci) { if (id != foci.FocusId) { return(BadRequest()); } _context.Entry(foci).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FociExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public Feat Clone() { var clone = new Feat(); clone.CanBeTakenMultipleTimes = CanBeTakenMultipleTimes; clone.Foci = Foci.ToArray(); clone.Frequency.Quantity = Frequency.Quantity; clone.Frequency.TimePeriod = Frequency.TimePeriod; clone.Name = Name; clone.Power = Power; return(clone); }