public ActionResult Post([FromBody] Publishers publisher) { _context.Publishers.Add(publisher); _context.SaveChanges(); return(new CreatedAtRouteResult("Obtener Publisher", new { id = publisher.PubId }, publisher)); }
private static void InsertData(TblMovie t) { using (var db = new pubsContext()) { db.TblMovies.Add(t); db.SaveChanges(); } }
public void Insert(Boek item) { _context.Add(item); _context.SaveChanges(); }