public int Add(Model.Authors.Author item) { using (var context = new IdentityExDbEntities()) { return(context.Author_Insert(item.FirstName, item.LastName, item.Note, item.Description, item.UserCreated?.Id)); } }
public Model.Authors.Author Save(Model.Authors.Author item) { using (var context = new IdentityExDbEntities()) { context.Author_Save(item.Id, item.FirstName, item.LastName, item.Note, item.Description, item.UserLastModified?.Id); return(item); } }
public bool Delete(Model.Authors.Author item) { try { using (var context = new IdentityExDbEntities()) { context.Author_Delete(item.Id, item.UserLastModified?.Id); return(true); } } catch (Exception e) { Console.WriteLine($"The exception is: '{e}'"); return(false); } }