Esempio n. 1
0
        public async Task <ActionResult <Bloc> > PostBloc(Bloc bloc)
        {
            _context.Blocs.Add(bloc);
            await _context.SaveChangesAsync();

            return(CreatedAtAction(nameof(GetBloc), new { id = bloc.ID }, bloc));
        }
Esempio n. 2
0
        public async Task <ActionResult <Cotation> > PostCotation(Cotation bloc)
        {
            _context.Cotations.Add(bloc);
            await _context.SaveChangesAsync();

            return(CreatedAtAction(nameof(GetCotation), new { id = bloc.ID }, bloc));
        }