Exemple #1
0
        public MemberService(ITechLeadDatabaseSettings settings)
        {
            try {
                var client   = new MongoClient(settings.ConnectionString);
                var database = client.GetDatabase(settings.DatabaseName);

                _members = database.GetCollection <Member>(settings.MembersCollectionName);
            }
            catch (Exception ex) {
                System.Console.WriteLine(ex);
            }
        }
Exemple #2
0
        public ProductFeedbackService(ITechLeadDatabaseSettings settings)
        {
            try
            {
                var client   = new MongoClient(settings.ConnectionString);
                var database = client.GetDatabase(settings.DatabaseName);

                _productFeedback = database.GetCollection <ProductFeedback>(settings.ProductFeedbackCollectionName);
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex);
            }
        }
        public WishlistService(ITechLeadDatabaseSettings settings)
        {
            try
            {
                var client   = new MongoClient(settings.ConnectionString);
                var database = client.GetDatabase(settings.DatabaseName);

                _wishlists = database.GetCollection <Wishlist>(settings.WishlistCollectionName);
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex);
            }
        }
 public LoginService(ITechLeadDatabaseSettings settings)
 {
     _settings = settings;
 }