public RepositoryBase(IGraphQLAPIContext context) { var client = new MongoClient(context.ConnectionString); var database = client.GetDatabase(context.DatabaseName); _collection = database.GetCollection <T>(typeof(T).Name.ToLower()); if (_collection == null) { database.CreateCollection(typeof(T).Name); _collection = database.GetCollection <T>(typeof(T).Name.ToLower()); } }
public LikeRepository(IGraphQLAPIContext context) : base(context) { }
public ArticleRepository(IGraphQLAPIContext context) : base(context) { }
public UserRepository(IGraphQLAPIContext context) : base(context) { }