abstractleap / dashing Goto Github PK
View Code? Open in Web Editor NEWDashing is a simple to use mini ORM built on top of Dapper
License: MIT License
Dashing is a simple to use mini ORM built on top of Dapper
License: MIT License
Or vice versa.
When changing a column from a string to a Timespan, or Timespan to string, an exception of type
Caught unhandled InvalidOperationException
An OppositeColumn only exists on a OneToOne relationship
is thrown. Should probably be something else.
I wasn't able to register the Mysql Data Provider whose config had been updated in the app.config of my project registered in PathToDll. Instead, I had to copy it to the DbProviderFactories section in the machine.config.
Would prefer to have a .config file that is used by dbm without a dependency to machine.config.
I have several base entities, all with similar stuctures, which all inherit from an interface. When querying a parent object, the interface type is used rather than the concrete type.
e.g.
ApplyTagsSearch<TEntity, TTag>(this ISelectQuery<TEntity> query) where TEntity : class, IHasTags<TTag, TEntity>, new() where TTag : IIAmTag<TEntity> { query.Where(o => o.Tags.Any(ot => tags.Contains(ot.Tag.TagId))); }
tags
is an int[]
of tag IDs
The exception thrown by Dashing is "Type IIAmTag`1 is not mapped"
class Entity {
public OtherEntity OtherEntity { get; set; }
}
to
class Entity {
public AnotherEntity OtherEntity { get; set; }
}
doesn't get spotted by dbm as a change to the foreign key
query.Where(s => s.StartDate <= DateTime.UtcNow.Date);
throws a null reference exception where
var today = DateTime.UtcNow.Date; query.Where(s => s.StartDate <= today);
Does not.
See here for failing test:
a55d838
Do you have plans to migrate Dashing to netstandard2.0 and newer versions of .net core such as 2.1 and 3.1?
Currently, .Any()
is supported on enumerables within the query - e.g. .Where(customer => customer.Orders.Any(o => o == order))
. It would be useful to be able to use .Any()
on enumerables which have been declared in the calling scope - e.g. .Where(customer => ordersOutsideQuery.Any(o => o.Customer.Name.StartsWith(customer.Name)))
In InMemoryEngine
the Save will return the number of entities that already exist and updates them where necessary. In SQLEngine
the Save will return the number of entities to be updated. In the case where the item exists but doesn't need to be updated InMemoryEngine
returns 1 and SQLEngine
returns 0. The 0 returned from SQLEngine
then prompts the Insert.
Save()
return values:
| Exists no change | Exists change needed | Does not exist
InMemoryEngine | 1 | 1 | 0
SQLEngine | 0 | 1 | 0
Save()
!= Exists()
in SQLEngine
is there a better method to check whether something already exists in InsertOrUpdate()
or should Save()
change so that is is synonymous with exists.
Either way InMemoryEngine
and SQLEngine
should give the same results.
If there is one or more entities without a primary key then the rest of the entities break on tracking:
Initialization method Dashing.Repository.Tests.CRUDTests.Test_Initialize threw exception. System.InvalidCastException: System.InvalidCastException: Unable to cast object of type 'Dashing.Model.Product' to type 'Dashing.CodeGeneration.ITrackedEntity'..
To reproduce add this class to TestDomain:
public class NoPrimary {
public virtual string Name { get; set; }
}
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.