public async Task <IActionResult> Create(Developer developer) { if (ModelState.IsValid) { _context.Add(developer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(developer)); }
public async Task <IActionResult> Post([FromBody] Developer developer) { _context.Add(developer); await _context.SaveChangesAsync(); return(Created(developer)); }
public async Task <IActionResult> Post([FromBody] House house) { _context.Add(house); await _context.SaveChangesAsync(); return(Created(house)); }