public async Task <IActionResult> Create([Bind("Id,NoSiret,Nom,Adresse,NoTel,Mail")] Client client)
        {
            if (ModelState.IsValid)
            {
                client.Id = Guid.NewGuid();
                _context.Add(client);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(client));
        }
        public async Task <IActionResult> Create([Bind("Id,IdFacture,Nom,Montant,Description")] Prestation prestation)
        {
            if (ModelState.IsValid)
            {
                prestation.Id = Guid.NewGuid();
                _context.Add(prestation);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Edit", "Factures", new { id = prestation.IdFacture }));
            }
            ViewData["IdFacture"] = new SelectList(_context.Factures, "Id", "Id", prestation.IdFacture);
            return(View(prestation));
        }
        public async Task <IActionResult> Create([Bind("Id,IdClient,NoFacture,DateEmission,DateReglement,Description")] Facture facture)
        {
            if (ModelState.IsValid)
            {
                facture.Id = Guid.NewGuid();
                _context.Add(facture);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdClient"] = new SelectList(_context.Clients, "Id", "Nom", facture.IdClient);
            return(View(facture));
        }