Register all database classes using their default configurations using the same connection string
Parameters
- connectionString
- the connection string to use for all database state factories
- dataRetention
- data retention for all stored objects
Return Value
The service configuration
Following sample show how to use the same database and schema for all state object in the firewall with a year of data
services.AddFireWall( FireWallTrial.License
, FireWallTrial.DomainKey
, domainName: new Uri("https://www.your-domain.dll", UriKind.Absolute)
, options => {
//set your options
}).UserDatabase( connectionString:Configuration.GetConnectionString("FireWall")
, dataRetention: TimeSpan.FromDays(365));
services.AddMvc(options =>
{
options.Filters.Add<Walter.Web.FireWall.Filters.FireWallFilter>();
options.Filters.Add<Walter.Web.FireWall.Filters.PrivacyPreferencesFilter>();
}).AddApplicationPart(Assembly.GetAssembly(typeof(Walter.Web.FireWall.DefaultEndpoints.ReportingController)));
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2