Ejemplo n.º 1
0
        public async Task <Laptop> AddLaptop(Laptop laptop)
        {
            if (!_laptopValidator.IsLaptopValid(laptop))
            {
                throw new Exception("Laptop with same details found, please add different laptop" + laptop);
            }

            return(await _laptopRepository.AddLaptop(laptop));
        }