diff --git a/Marco.Pms.CacheHelper/EmployeeCache.cs b/Marco.Pms.CacheHelper/EmployeeCache.cs index 4a668f0..2211393 100644 --- a/Marco.Pms.CacheHelper/EmployeeCache.cs +++ b/Marco.Pms.CacheHelper/EmployeeCache.cs @@ -1,5 +1,4 @@ -using Marco.Pms.DataAccess.Data; -using Marco.Pms.Model.MongoDBModels; +using Marco.Pms.Model.MongoDBModels; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using MongoDB.Driver; @@ -8,13 +7,10 @@ namespace Marco.Pms.CacheHelper { public class EmployeeCache { - private readonly ApplicationDbContext _context; - //private readonly IMongoDatabase _mongoDB; private readonly IMongoCollection _collection; - public EmployeeCache(ApplicationDbContext context, IConfiguration configuration) + public EmployeeCache(IConfiguration configuration) { var connectionString = configuration["MongoDB:ConnectionString"]; - _context = context; var mongoUrl = new MongoUrl(connectionString); var client = new MongoClient(mongoUrl); // Your MongoDB connection string var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name