Ejemplo n.º 1
0
        public async Task <Promocion> Create(Promocion p)
        {
            try
            {
                p.Activar();
                p.CargarFechaCreate();

                await _context.Promociones.InsertOneAsync(p);

                return(p);
            }
            catch (Exception ex)
            {
                // log or manage the exception
                throw ex;
            }
        }