massive

How to use Rich Domain with Massive Operations?

风格不统一 提交于 2019-12-06 04:30:41
问题 Since I am working on a relatively complex problem, I would like to use the Domain Driven Design approach to solving it. Problem in question is calculating monthly invoices for clients. The current solution is implemented as a very long Stored Procedure that is difficult to maintain. I would like to use Object Oriented environment (possibly POCO and Entity Framework) but I am worried about performance. Current SP takes some 10 minutes to generate more than 300 000 records by using set

Count on an IEnumerable<dynamic>

僤鯓⒐⒋嵵緔 提交于 2019-12-05 10:37:55
I'm using Rob Conery's Massive ORM. Is there an elegant way to do a count on the record set returned? dynamic viewModelExpando = result.ViewData.Model; var queryFromMassiveDynamic = viewModelExpando.TenTricksNewestFirst; //fails as have actually got TryInvokeMember on it var z = queryFromMassiveDynamic.Count(); //works int i = 0; foreach (var item in queryFromMassiveDynamic) { i++; } Rather than calling it using the extension method member syntax, try calling the static method directly. int count = Enumerable.Count(queryFromMassiveDynamic); The question is a bit off. You're not actually doing

Updating SQL Server 2008 records w/spatial data types via Massive ORM (ExecuteNonQuery), UdtTypeName error

荒凉一梦 提交于 2019-12-04 11:57:36
I'm trying to use Massive "dynamic ORM" by Rob Conery to query my DB (working GREAT so far). Ran into a problem when I added a Geography field to my tables. Here's the error: UdtTypeName property must be set for UDT parameters Update (14Apr2011): The ADO method that is throwing the exception is .ExecuteNonQuery(); Here's the method from Massive.cs that throws the exception: public virtual int Execute(IEnumerable<DbCommand> commands) { var result = 0; using (var conn = OpenConnection()) { using (var tx = conn.BeginTransaction()) { foreach (var cmd in commands) { cmd.Connection = conn; cmd

Java Micro ORM equivalent [closed]

余生颓废 提交于 2019-12-03 00:52:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . What would be the closest equivalent in Java to a Micro ORM such as Dapper, PetaPoco, Massive or CodingHorror? 回答1: I recommend Spring JDBC templates. While it's not a "true" ORM, it's a pleasure to use where Hibernate seems to be an overkill. 回答2: sql2o seems like a Dapper alternative - thin wrapper around JDBC

Java Micro ORM equivalent [closed]

痴心易碎 提交于 2019-12-02 14:16:50
What would be the closest equivalent in Java to a Micro ORM such as Dapper , PetaPoco , Massive or CodingHorror ? I recommend Spring JDBC templates . While it's not a "true" ORM, it's a pleasure to use where Hibernate seems to be an overkill. sql2o seems like a Dapper alternative - thin wrapper around JDBC String sql = "SELECT id, category, duedate " + "FROM tasks " + "WHERE category = :category"; Sql2o sql2o = new Sql2o(DB_URL, USER, PASS); List<Task> tasks = sql2o.createQuery(sql) .addParameter("category", "foo") .executeAndFetch(Task.class); github - https://github.com/aaberg/sql2o site -

Allow mapping of dynamic types using AutoMapper or similar?

空扰寡人 提交于 2019-11-27 10:21:26
I've started to use https://github.com/robconery/massive for a project, I wonder if there is any mapping tool that allows support for Dynamic to static type mapping? I've used AutoMapper previously, does AutoMapper support this? I am aware of the DynamicMap function from AutoMapper, however I believe this function is for running maps without creating the Map first. In my example below it does not work. dynamic curUser = users.GetSingleUser(UserID); var retUser = Mapper.DynamicMap<UserModel>(curUser); users.GetSingleUser(UserID); // returns a dynamic object AutoMapper 4.2.0 now supports Dynamic