mapstermapper / mapster.efcore Goto Github PK
View Code? Open in Web Editor NEWEF Core plugin for Mapster
EF Core plugin for Mapster
Query fails with exception when used ProjectToType with entity having child class in JSONB format (EF.Core 7):
"The LINQ expression 'namelessParameter{0} => new Dto{ Number = namelessParameter{0}.Number, Date = namelessParameter{0}.Date, Amount = namelessParameter{0}.Amount' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'.
EF.Core without using ProjectToType translates it corerctly.
`
public class Entity
{
public string Id { get; set; }
public string Name { get; set; }
public Info[] Info
}
public class Info
{
public string Number { get; set; }
public DateOnly Date { get; set; }
public decimal Amount { get; set; }
}
public class EntityConfiguration : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.HasKey(u => u.Id);
builder.Property(p => p.Info)
.HasColumnType("jsonb");
}
}
`
Please update the project to use EF Core 7.0 and Mapster 7.4.0-pre05. The latter has changes to it and requires the use of ITypeAdapterBuilder
instead of TypeAdapterBuilder
.
Currently the dependencies are for Mapster 4.1.1 and Ef Core 2.0.0 which are way old.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.