Is Microsoft-ORM from Microsoft?

Micro-ORM Dapper can easily populate an object from a database without the need to define other entities or classes. The following is sample Dapper code.

Is there an equivalent Microsoft package with the same functionality?

What is the Microsoft package that is closest to Dapper ?

 var stuff = db.Query<stuffclass>("select a,b,c from Foo where a = {0}", x) 
+4
source share
3 answers

Enterprise Library 5.0 (and possibly earlier versions, I have not tested) contains methods such as ExecuteSqlStringAccessor<TResult> , which I believe use the MapBuilder<TResult> API . I have not worked with this to comment on his ability / performance.

Another interesting option is to use something like LINQ-to-SQL DataContext without reporting the model, and just use the ExecuteQuery<TResult> method; since the type is not known to the data context, it should skip all bits of the identifier / change manager control. But! It should be noted that one of the reasons we wrote dapper, first of all, was that we noticed performance problems (lost time not related to the request itself), looked like a cache metaprogramming layer).

+5
source

Well, I think Dapper is closest to Simple.Data, which will answer your question, but not sure if this will match what you are looking for.

0
source

I would look at the SQL data ( http://sqldata.codeplex.com ). It is fast like Dapper and very convenient for developers.

(Disclosure - I am the author of SQL data)

0
source

Source: https://habr.com/ru/post/1483499/


All Articles