Exemple #1
0
        public static VinylDTO Map(IVinyl vinyl)
        {
            VinylDTO vinylDTO = new VinylDTO
            {
                ID      = vinyl.ID,
                Title   = vinyl.Title,
                Band    = vinyl.Band,
                Price   = vinyl.Price,
                InStock = vinyl.InStock
            };

            return(vinylDTO);
        }
Exemple #2
0
        public async Task <bool> AddVinyl(VinylDTO vinyl)
        {
            IVinyl vinylObj = DTOMapper.Map(vinyl);

            return(await Task.FromResult(vinylDataBase.AddStock(vinylObj.ID, vinylObj.InStock)));
        }
Exemple #3
0
 public Order(int ID, IClient client, IVinyl vinyl)
 {
     this.ID     = ID;
     this.client = client;
     this.vinyl  = vinyl;
 }