public void AddBookshelfAisle(int BookshelfAisleNumber) { using var context = new LibraryContext(); var BookshelfAisle = new BookShelfAisle(); BookshelfAisle.BookshelfAisleNumber = BookshelfAisleNumber; context.BookShelfAisles.Add(BookshelfAisle); context.SaveChanges(); }
private static Mock <IBookshelfAisleManager> SetUpMock(BookShelfAisle bookshelfAisle) { var UniTestsMock = new Mock <IBookshelfAisleManager>(); UniTestsMock.Setup(m => m.GetBookshelfAisleByBookshelfAisleNumber(It.IsAny <int>())) .Returns(bookshelfAisle); UniTestsMock.Setup(m => m.AddBookshelfAisle(It.IsAny <int>())); return(UniTestsMock); }