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(); } }
public ChangeController(QuoContext context) { _context = context; if (_context.Quotations.Count() == 0) { _context.Quotations.Add(new Quotation { moneda = "", precio = 0 }); _context.SaveChanges(); } #region ServiceMethods }