Anupam- / dapper-dot-net

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

List support #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have the following query:

select  t.Title, t.Slug, pt.Post_id as PostId 
from    BlogPostTags pt inner join Tags t on pt.Tag_id = t.TagId 
where   pt.Post_id in @ids order by t.Title

And passing an IEnumerable<Guid> to dapper:

var tags = session.Connection.Query(query,new { ids = postIds });

According to mvc-mini-profiler it's generating the following query, which 
doesn't look right:

select  t.Title, t.Slug, pt.Post_id as PostId from    
BlogPostTags pt inner join Tags t on pt.Tag_id = t.TagId                     
where   pt.Post_id in (@ids, ids, ids, ids, ids5) order by t.Title

Is this an issue with the profiler or dapper?  The query does appear to be 
returning the correct results (in this case it returns the tags for 5 posts) 
but I'm not sure why it shows "ids, ids, ids," ?

Original issue reported on code.google.com by b...@planetcloud.co.uk on 9 Jun 2011 at 5:44

GoogleCodeExporter commented 9 years ago
I *think* this is a bizarre edge-case of the regex we use for white-space 
removal in mini-profiler. I will investigate. Good to see people using the two 
tools together, though :)

Original comment by marc.gravell on 9 Jun 2011 at 6:24

GoogleCodeExporter commented 9 years ago
yeah ... this is actually an old mvc mini profiler bug that was since fixed ... 

Original comment by sam.saff...@gmail.com on 13 Jul 2011 at 7:03