public UserService() { if (HttpContext.Current.Items.Contains("userId")) { var userIdStr = HttpContext.Current.Items["userId"].ToString(); Guid.TryParse(userIdStr, out _userId); } if (HttpContext.Current.Items.Contains("facebookId")) { _facebookId = HttpContext.Current.Items["facebookId"].ToString(); } var connStr = RoleEnvironment.GetConfigurationSettingValue("DataModelConnectionString"); connStr = HttpUtility.HtmlDecode(connStr); _dbContext = new DataModelContainer(connStr); _dbContext.Configuration.ProxyCreationEnabled = false; }
public DataPopulation() { _dbContext = new DataModelContainer(); }