Esempio n. 1
0
        public EFGameRepository()
        {
            string mdfFilePath = HttpContext.Current.Server.MapPath("~/App_Data/GameStore.mdf");

            context = new EFDbContext(string.Format(@"Data Source=.\SQLEXPRESS;AttachDbFilename={0};Integrated Security=True;User Instance=True", mdfFilePath));
        }
 public EFOfferRepository(EFDbContext context)
 {
     this.context = context;
 }
        public EFGameRepository()
        {
            string mdfFilePath = HttpContext.Current.Server.MapPath("~/App_Data/GameStore.mdf");

            context = new EFDbContext(string.Format(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename='{0}';Integrated Security=True;", mdfFilePath));
        }