This is a migrated thread and some comments may be shown as answers.

Create EntityModel using a Stored Procedure

2 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anderson
Top achievements
Rank 1
Anderson asked on 17 Jan 2014, 06:28 PM
Hi,

I was wondering if there was a method of using the result of a stored procedure to generate the domain model.

I understand that I can give OpenAccess ORM an existing table in my DB and it will create a matching EntityModel for it, but because of how our data warehouse is set up, I would like to have a stored procedure draw from the various tables, and have the result be the Domain model that is created.

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Kaloyan Nikolov
Telerik team
answered on 22 Jan 2014, 01:24 PM
Hello Anderson,

Telerik OpenAccess ORM offers two options in this direction:
1. You could map your tables in such way that all CUD operations will be performed as stored procedures . The select queries still will be performed directly against the table which will give you the possibility to use LINQ queries. As a result you will have an endpoint in your context class for each mapped table

2. You could map your stored procedures as Domain Methods. You will be able to invoke the CRUD store procedures but this approach doesn't support LINQ queries. 

I hope this helps. Please do not hesitate to get back to us with any further questions. 

Regards,
Kaloyan Nikolov
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Anderson
Top achievements
Rank 1
answered on 22 Jan 2014, 04:17 PM
Thanks.
Tags
General Discussions
Asked by
Anderson
Top achievements
Rank 1
Answers by
Kaloyan Nikolov
Telerik team
Anderson
Top achievements
Rank 1
Share this question
or