public GenericRepository()
        {
            DBCon  Dbcon  = new DBCon();
            String constr = Properties.Settings.Default.dbString;

            db = new LinqToSQlDataContext(constr);
        }
Пример #2
0
        public void createConnection()
        {
            try

            {
                String constr = Properties.Settings.Default.dbString;
                db = new LinqToSQlDataContext(constr);
            }

            catch (Exception es)

            {
                Console.WriteLine(es.Message);
            }
        }