public void ReturnBook(HardCopy copy) { var history = new BookLeaningHistory { HardCopyId = copy.Id, UserLeantTo = copy.UserLeantTo.Value, LeantDate = copy.LeantDate.Value, ReturnedDate = DateTime.Now }; _libraryContext.BookLeaningHistories.InsertOnSubmit(history); _libraryContext.SubmitChanges(); }
private void detach_HardCopies(HardCopy entity) { this.SendPropertyChanging(); entity.Book = null; }
private void attach_HardCopies(HardCopy entity) { this.SendPropertyChanging(); entity.Book = this; }
partial void DeleteHardCopy(HardCopy instance);
partial void UpdateHardCopy(HardCopy instance);
partial void InsertHardCopy(HardCopy instance);