asr0 / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

When update or insert a model if the model defines the navigation attributes or complex attributes will throw exception #100

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

class Model1{}

class Model2{
   int id{get;set;}
   Model1 {get;set;} //navigation attributes 
}
...
db.Insert<Model2>(model2);

it will throw an exception at SqlMapper.cs 324 line
"throw new NotSupportedException(string.Format("The member {0} of type {1} 
cannot be used as a parameter value", name, type));"

I think these properties should be ignored

Original issue reported on code.google.com by langzhon...@gmail.com on 15 Jun 2012 at 5:38