Пример #1
0
        public HomeController(ILogger <HomeController> logger, QuoContext context)
        {
            _logger  = logger;
            _context = context;

            if (_context.Quotations.Count() == 0)
            {
                _context.Quotations.Add(new Quotation {
                    moneda = "", precio = 0
                });
                _context.SaveChanges();
            }
        }
Пример #2
0
        public ChangeController(QuoContext context)
        {
            _context = context;

            if (_context.Quotations.Count() == 0)
            {
                _context.Quotations.Add(new Quotation {
                    moneda = "", precio = 0
                });
                _context.SaveChanges();
            }

            #region ServiceMethods
        }