5529858edd
properly hide broadcast failure messages if ignore connection lost is turned on fix concurent issue for update stats history that happened with new event processing make get/set additional property thread safe add ellipse to truncated chat messages on home
22 lines
739 B
C#
22 lines
739 B
C#
using SharedLibraryCore.Database;
|
|
using SharedLibraryCore.Interfaces;
|
|
|
|
namespace IW4MAdmin.Application.Factories
|
|
{
|
|
/// <summary>
|
|
/// implementation of the IDatabaseContextFactory interface
|
|
/// </summary>
|
|
public class DatabaseContextFactory : IDatabaseContextFactory
|
|
{
|
|
/// <summary>
|
|
/// creates a new database context
|
|
/// </summary>
|
|
/// <param name="enableTracking">indicates if entity tracking should be enabled</param>
|
|
/// <returns></returns>
|
|
public DatabaseContext CreateContext(bool? enableTracking = true)
|
|
{
|
|
return enableTracking.HasValue ? new DatabaseContext(disableTracking: !enableTracking.Value) : new DatabaseContext();
|
|
}
|
|
}
|
|
}
|