public RentalRateDto(int _rentalRateID, int? _categoryID, decimal? _daily, decimal? _weekly, decimal? _monthly, CategoryDto _category) { this.RentalRateID = _rentalRateID; this.CategoryID = _categoryID; this.Daily = _daily; this.Weekly = _weekly; this.Monthly = _monthly; this.Category = _category; }
/// <summary> /// Deletes category from the database by the given dto object. /// </summary> /// <param name="category">The dto object.</param> public void DeleteCategory(CategoryDto category) { this.CategoryService.Delete(category); this.UnitOfWork.SaveChanges(); }
public CarDto(int _carID, string _tagNumber, string _make, string _model, short? _carYear, int? _categoryID, bool? _mp3Player, bool? _dVDPlayer, bool? _airConditioner, bool? _aBS, bool? _aSR, bool? _navigation, bool? _available, double? _latitude, double? _longitude, string _imageFileName, decimal? _rating, int? _numberOfRatings, CategoryDto _category, IList<RentalOrderDto> _rentalOrders) { this.CarID = _carID; this.TagNumber = _tagNumber; this.Make = _make; this.Model = _model; this.CarYear = _carYear; this.CategoryID = _categoryID; this.Mp3Player = _mp3Player; this.DVDPlayer = _dVDPlayer; this.AirConditioner = _airConditioner; this.ABS = _aBS; this.ASR = _aSR; this.Navigation = _navigation; this.Available = _available; this.Latitude = _latitude; this.Longitude = _longitude; this.ImageFileName = _imageFileName; this.Rating = _rating; this.NumberOfRatings = _numberOfRatings; this.Category = _category; this.RentalOrders = _rentalOrders; }
/// <summary> /// Adds a new category from the given dto object into the database. /// </summary> /// <param name="category">The dto object.</param> /// <returns>The dto key of the newly created category.</returns> public string CreateCategory(CategoryDto category) { string key = this.CategoryService.Add(category); this.UnitOfWork.SaveChanges(); return key; }