示例#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
        }