is this a stupid question?

I'm googling my socks off but can only find examples where the
returned data is an already mapped entity...

On Aug 28, 10:34 am, Wayne Douglas <[email protected]> wrote:
> Hey
>
> When using stored procedures to get data - does the result need to be
> able to map to a model class which maps to a table?
>
> I.e. can the SP return cols from 1*n tables to map to a single nhib class?
>
> Can I do the following:
>
> <code>
>
> create procedure Get_stuff_from_thing
> as
>
> select a.col1, a.col2, b.col1 as col3 from table1 as a join table2 b
> on a.foreignkey = b.id
>
> </code>
>
> and map the result to a new class:
>
> <code>
>
> public class Stuff {
>     public string Col1{get;set}
>     public string Col2{get;set}
>     public string Col3{get;set}
>
> }
>
> </code>
>
> Know what I mean?
>
> --
> Cheers,
>
> w://
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to