public NatureRecorderFactory(NatureRecorderDbContext context) { Context = context; _locations = new Lazy <ILocationManager>(() => new LocationManager(this)); _categories = new Lazy <ICategoryManager>(() => new CategoryManager(this)); _species = new Lazy <ISpeciesManager>(() => new SpeciesManager(this)); _sightings = new Lazy <ISightingManager>(() => new SightingManager(this)); _users = new Lazy <IUserManager>(() => new UserManager(context)); _export = new Lazy <ISightingsExportManager>(() => new SightingsExportManager()); _import = new Lazy <ISightingsImportManager>(() => new SightingsImportManager(this)); _statusSchemes = new Lazy <IStatusSchemeSchemeManager>(() => new StatusSchemeSchemeManager(this)); _statusRatings = new Lazy <IStatusRatingManager>(() => new StatusRatingManager(this)); _speciesStatusRatings = new Lazy <ISpeciesStatusRatingManager>(() => new SpeciesStatusRatingManager(this)); _speciesStatusExport = new Lazy <ISpeciesStatusExportManager>(() => new SpeciesStatusExportManager()); _speciesStatusImport = new Lazy <ISpeciesStatusImportManager>(() => new SpeciesStatusImportManager(this)); }
public UserManager(NatureRecorderDbContext context) { _hasher = new Lazy <PasswordHasher <string> >(() => new PasswordHasher <string>()); _context = context; }