Ejemplo n.º 1
0
 public GDRepository(GoodGood_DBContext context)
 {
     if (context == null)
     {
         throw new ArgumentException();
     }
     _context = context;
 }
Ejemplo n.º 2
0
        public HomeRepository(GoodGood_DBContext context, IConfiguration config)
        {
            _context = context;

            if (string.IsNullOrEmpty(connString))
            {
                connString = config.GetConnectionString("GoodGood_DBContext");
            }
            if (conn == null)
            {
                conn = new SqlConnection(connString);
            }
        }