public Bicycle(string name, int priceRent, TypeBike typeBike, StatusRent statusRent)
 {
     this.Name       = name;
     this.PriceRent  = priceRent;
     this.TypeBike   = typeBike;
     this.StatusRent = statusRent;
 }
        public bool CreateTypeBike(TypeBike typeBike)
        {
            if (typeBike == null)
            {
                return(false);
            }

            _context.TypeBikes.Add(typeBike);

            return(true);
        }
        public async Task <IActionResult> Create(TypeBike typeBike)
        {
            if (!_typeBikeService.CreateTypeBike(typeBike))
            {
                return(new BadRequestObjectResult("Couldn't recognize the type"));
            }

            await _context.SaveChangesAsync();

            return(Ok());
        }