//[Route("author_add")] public ActionResult AddAuthor() { Models.AutherModels author = new Models.AutherModels { AuthorId = Guid.NewGuid(), AuthorName = "Vyasa", Added = System.DateTime.UtcNow }; library_repo.AddAuthor(author); return(View()); }
public bool UpdateAuthor(Models.AutherModels author) { _context.Entry(author).State = System.Data.EntityState.Modified; _context.SaveChanges(); return(true); }
public bool RemoveAuthor(Models.AutherModels author) { _context.Entry(author).State = System.Data.EntityState.Deleted; _context.SaveChanges(); return(true); }
public bool AddAuthor(Models.AutherModels author) { _context.Authors.Add(author); _context.SaveChanges(); return(true); }