All Projects → Innofactor → EfCoreJsonValueConverter

Innofactor / EfCoreJsonValueConverter

Licence: LGPL-3.0 license
JSON ValueConverter for EF Core 3.0+

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to EfCoreJsonValueConverter

Detached-Mapper
An ORM friendly mapper. Allows saving entire entity graphs. Heavily inspired in GraphDiff and AutoMapper.
Stars: ✭ 89 (+4.71%)
Mutual labels:  efcore
Vue.netcore
.NetCore+Vue2/Vue3+Element plus,前后端分离,不一样的快速开发框架;提供Vue2、Vue3版本,。http://www.volcore.xyz/
Stars: ✭ 2,338 (+2650.59%)
Mutual labels:  efcore
EntityFrameworkCore.Triggered
Triggers for EFCore. Respond to changes in your DbContext before and after they are committed to the database.
Stars: ✭ 361 (+324.71%)
Mutual labels:  efcore
WebApiJwt
Asp.NET Core 2.0 WebApi JWT Authentication with Identity & MySQL
Stars: ✭ 118 (+38.82%)
Mutual labels:  efcore
Util
Util是一个.net core平台下的应用框架,旨在提升小型团队的开发输出能力,由常用公共操作类(工具类)、分层架构基类、Ui组件,第三方组件封装,第三方业务接口封装,配套代码生成模板,权限等组成。
Stars: ✭ 3,874 (+4457.65%)
Mutual labels:  efcore
LYM.NetCore
IdentityServer4+EFCore
Stars: ✭ 17 (-80%)
Mutual labels:  efcore
cash-flow
Application for managing cash flows written in ASP.NET Core 6 and Angular 13 (EF Core, Apollo, GraphQL, CQRS)
Stars: ✭ 27 (-68.24%)
Mutual labels:  efcore
eShopOnWeb
Sample ASP.NET Core 6.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model. Download the eBook PDF from docs folder.
Stars: ✭ 8,250 (+9605.88%)
Mutual labels:  efcore
Efcore.bulkextensions
Entity Framework Core Bulk Batch Extensions for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, SQLite
Stars: ✭ 2,295 (+2600%)
Mutual labels:  efcore
BlazorEFCoreMultitenant
Examples of multitenancy using EF Core and Blazor.
Stars: ✭ 67 (-21.18%)
Mutual labels:  efcore
EntityFrameworkCore.SqlServer.SimpleBulks
Very simple .net library (lightweight, easy to use and customize) that supports bulk insert (return db generated Ids), bulk update, bulk delete and bulk merge database operations. Lambda Expression is also supported.
Stars: ✭ 95 (+11.76%)
Mutual labels:  efcore
Notify.Me
Simple host application to provide send/receive feature for any kind of notifications and messages between client(s) and the host. The application is based on ASP.NET Core and SignalR to demostrate some features of these things...
Stars: ✭ 28 (-67.06%)
Mutual labels:  efcore
EasyProfiler
This repo, provides query profiler for .Net
Stars: ✭ 99 (+16.47%)
Mutual labels:  efcore
cqrs-dotnet-core-example
A naive introduction to CQRS in C#
Stars: ✭ 62 (-27.06%)
Mutual labels:  efcore
ENLOCK
Efcore with no lock extention
Stars: ✭ 25 (-70.59%)
Mutual labels:  efcore
Laraue.EfCoreTriggers
Library for writing triggers in C# using package EFCore
Stars: ✭ 51 (-40%)
Mutual labels:  efcore
KentNoteBook
ASP.NET.Core and EF Core demo, JWT
Stars: ✭ 24 (-71.76%)
Mutual labels:  efcore
SapientGuardian.EntityFrameworkCore.MySql
MySQL database provider for Entity Framework Core
Stars: ✭ 54 (-36.47%)
Mutual labels:  efcore
MADE.NET
MADE.NET is a home to all of those bits of code that you know you'll reuse in another project. Making app development easier with .NET.
Stars: ✭ 75 (-11.76%)
Mutual labels:  efcore
EFCore.VisualBasic
Adds VB design-time support to EF Core
Stars: ✭ 20 (-76.47%)
Mutual labels:  efcore

JSON value converter for Entity Framework Core 3.0+

Publish NuGet

Serializes object properties in database as JSON blobs using Entity Framework Core value converters.

Usage example

Installing:

PM> Install-Package Innofactor.EfCoreJsonValueConverter

Annotate model properties with the JsonField attribute:

public class Customer {
  [JsonField]
  public Address Address { get; set; }
}

public class Address {
  // ...
}

This will persist Address property in database as JSON.

For DbContext:

  protected override void OnModelCreating(ModelBuilder builder) {

    builder.Entity<Customer>();
    builder.AddJsonFields();        
    
  }

Alternatively, individual fields can be mapped with the HasJsonValueConversion method:

  protected override void OnModelCreating(ModelBuilder builder) {

    builder.Entity<Customer>()
      .Property(m => m.Address)
      .HasJsonValueConversion();
    
  }

Note on performance

EF Core requires that tracked objects implement deep cloning and comparison. This library includes default fallback implementations for cloning and comparing, but for large objects that default implementation may be inefficient. To improve performance, it is recommended to manually implement ICloneable and IEquatable interfaces for complex JSON serialized objects. This library will then make use of those interfaces.

public class Address : ICloneable, IEquatable<Address> {
  // ...
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].