SamSaffron/dapper-dot-net — pull request #72 by ericdc1 (2012-12-17 18:51:38+00:00)
Title: Remove complex types from model for insert and update 

Sam,

We have situations where we have 1 store with a list of products.

public class Store {

//represents store table
public int Id {get; set;}
public string StoreName {get; set;}

//related table of products
public List products {get; set;}
}

public class Product{
//represents product table
public int Id {get; set;}
public int StoreId {get; set;}
public string ProductName {get; set;}
}

With models like this Rainbow builds up SQL for the list of Product when creating insert or update sql. Since the inserts or updates wouldn't ever work with complex types Query fails.

We would need to create separate models for the Store for interacting with the database and for actually using the Store in the application. I understand that in some cases that would be a better setup but I think this code change makes it easier to simplify domain and database models.

Eric