// constructor for new rental // add initial instance in separate action public Rental(int id, Locker locker, Renter renter) { this.locker = locker; this.renter = renter; Id = id; StartDate = DateTime.Now.Date; RentalDateTime = DateTime.Now; Status = RentalStatus.Active; }
// constructor for existing rental public Rental(int id, Locker locker, Renter renter, DateTime startDate, DateTime rentalDateTime, RentalStatus status, List <Instance> instances) { this.locker = locker; this.renter = renter; this.instances = instances; Id = id; StartDate = startDate; RentalDateTime = rentalDateTime; Status = status; }