Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (21 sloc) 507 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Data.Core.Infrastructure
{
public class DbFactory : Disposable, IDbFactory
{
DIContext dbContext;
public DIContext Init()
{
return dbContext ?? (dbContext = new DIContext());
}
protected override void DisposeCore()
{
if (dbContext != null)
dbContext.Dispose();
}
}
}