public void Save() { var bookInRentalGateWay = new BookInRentalTDG(); int tmpId = bookInRentalGateWay.Insert((int)this.Book.ID, (int)this.Rental.ID); ID = tmpId; }
public static List <BookInRentalActiveRecord> Find() { List <BookInRentalActiveRecord> booksInRentalList = new List <BookInRentalActiveRecord>(); var bookInRentalGateWay = new BookInRentalTDG(); DataTable dt = bookInRentalGateWay.Find(); foreach (DataRow dr in dt.Rows) { booksInRentalList.Add(MapResultsetToObject(dr)); } return(booksInRentalList); }