Found 41 packages
EntityFramework.Toolkit is a library which provides implementations for EntityFramework best practices, patterns, utilities and extensions.
EntityFramework Generic DbContext, both generic base class and generic interface
Base DbContext for MS SQL, Postgres, MySql
A sample useful MongoDB Driver Helper.Only rely MongoDB.Driver.Include function below: 1.BaseDbContext.cs:you can create your DbContext inherit BaseDbContext package some useful mongodb-to-C# mapping,like ObjectId<=>string,UTC<=>LocalTime,Enum<=>string,property name to camel field..etc 2.can get ConnetionString from env "CONNECTIONSTRINGS_MONGO" in docker container or "ConnectionStrings.Mongo" in appsettings.json: 3.BsonDocumentExtends.cs: extend method to BsonValue,for example: var bs={info:{gender:{k:'01',v:'Man'}}} . we can get "Man" through bs.GetValueByHierarchicalNames("info.gender.v") 4.you can simply using BL.MongoDB.Gen's AddBLMongoDbContext method in ConfigureServices(startup.cs) to create your DbContext 5.example.api have some simple code for refering
Entity Context Library provides a factory class for DbContext, UnitOfWork class for transaction and a base repository class to be used for each database entity.
Provides the following: * EntityBase - a base entity class to inherit from. Provides the following fields: Created (datetime) LastModified (datetime?) Enabled (bool) * DbContextWithAutomaticTrackingFields - when persisting entities which derive from EntityBase, this will automatically set Created to the current timestamp on a new entity and update LastModified on an updated entity * Extensions to: - AddRange on an IDbSet - AddRange on an ICollection - RemoveRange on an IDbSet - RemoveRange on an ICollection - Clear on IDbSet (delete all in dbset) - AddNew on IDbSet and ICollection - Convenience method so you can, for example, do: var someItem = context.SomeCollection.FirstOrDefault(i => i.Name == "bob") ?? context.Collection.AddNew(e => e.Name = "bob"); which finds the first bob or adds a new one - Transform, which provides a fluent manner to do what you would with Select(), but on a single result
This package contains base interfaces that enable developers to implement Unit Of Work and Repository patterns with data stores.
Contains classes to help with testing when entity and a SQL Server would be involved in production: * TestFixtureWithTempDb provides bootstrapping for tests which would use a temporary database (TempDBLocalDb) * EntityPersistenceTestFixtureBase provides helpers for the common test of persisting and recalling entities to test that mappings (automatic or manual) work as expected * DbContextExtensions adds SaveChangesWithErrorReporting(), an extension method for DbContext derivatives to provide more information within tests as to why a test is failing (such information is usually buried within the exception maze that Entity provides)
Structure Basical: Extensions Methods, Sql DbContext, Sql Repository & UnitOfWork, Mongo DbContext, Mongo Repository & UnitOfWork, Mongo GridFs, Utilities, Exception Handler, ApiResponse
Provides implementations for persistence layer of DDD with MongoDb. Commonly used types: Cnblogs.Architecture.Ddd.Infrastructure.MongoDb.MongoContext Cnblogs.Architecture.Ddd.Infrastructure.MongoDb.MongoBaseRepository
This library automatically sets the createdAt and updatedAt properties. This library uses the code from the following tutorial as a base: https://www.entityframeworktutorial.net/faq/set-created-and-modified-date-in-efcore.aspx
Bulud.NET is a utility library for .NET applications that provides: - Custom exception handling - Global exception middleware with Serilog & Loki integration - Extension methods for EF Core, Claims, Collections, and more - Base infrastructure for Repository & DbContext - Data exporting to CSV and PDF - Authorization helpers and JWT utilities
About A roslyn analyzer that will prevent dbcontext from being injected into ControllerBase with dependency injection in asp.net core.
Configure MongoSettings class as connection string to use it as IOptions, Use MongoDocumentBase class as entity base, INoSqlBaseRepository as repository interface base, MongoDbBaseRepository as repository implementation base, and MongoContextBase as MongoDb Context Base
Entity Framework Core extensions providing DbContextBase with CRUD operations, Result pattern error handling, transaction management, bulk operations, and async paging.
ApiBase Repository library: provides a generic DbContext and base repository implementation with dynamic query support for Entity Framework Core.
Provides EF Core DbContext base for Puya Platform and it's plugins
Entity Framework Code first get started project structure such as: - ApplicationDbContext - ApplicationDbInitializer - BaseEntity
The connection management wrapper for Dapper.net. *************************************** // To create an instance of database context inherit DbContext class TestDb : DbContext { private const string ConnectionName = "DefaultConnection"; private TestDb() : base(ConnectionName) { } } // execute multiple statatements using same connection // connection and transaction (if needed) var db = new TestDb(); db.Batch(s => { s.BeginTransaction(); try { s.Execute([Your query]); s.CommitTransaction(); } catch { s.RollbackTransaction(); throw; } }); // using it with ninject kernel.Bind<IDbContext>().To<TestDb>().InSingletonScope();