public static void UpdateApplicationChangeDate(Guid applicationId, DateTime now) { GDPRDatabaseEntities g = Util.GetGDPRDBContext(Util.GDPRSQLConnectionString); string sql = string.Format("update application set ChangeDate='{1}' where applicationid = '{0}'", applicationId, now); g.Database.ExecuteSqlCommand(sql); }
static MasterGDPRHelper() { const string metaData = "res://*/GDPRModel.csdl|res://*/GDPRModel.ssdl|res://*/GDPRModel.msl"; const string appName = "EntityFramework"; const string providerName = "System.Data.SqlClient"; EntityConnectionStringBuilder efBuilder = new EntityConnectionStringBuilder(); efBuilder.Metadata = metaData; efBuilder.Provider = providerName; efBuilder.ProviderConnectionString = Util.GDPRSQLConnectionString; gdprDB = new GDPRDatabaseEntities(efBuilder.ConnectionString); }