Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("Id,Number,ContractName,Name,Address,Latitude,Longitude,Banking,Available_bikes,Available_stands,Capacity,Status")] DublinBike bike)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bike);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bike));
        }
        public async Task <IActionResult> Create([Bind("Id,Number,Name,Address,Latitude,Longitude")] Bikes bikes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bikes);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bikes));
        }