1

I would like to realize a dynamic query builder using ASPNET MVC; i will ask the user db parameters (hostname, db, user, passwd) and then would like to use Linq to query the database using Entity Framework. For doing this i need to create the Entity Data Model at runtime ... is it possibile a similar thing?

10
  • hmmm what is the desired effect, code-generation of the classes? Commented May 4, 2013 at 12:23
  • @Cris: how is it possible to create a EntityConnection based on the parameters without the CSL,SSDL & MSL in place. Commented May 4, 2013 at 12:37
  • I'm quite 'open minded' but it ain't clear how do you imagine to e.g. use LINQ if you don't have compiled entities. Apart from using 'dynamic linq'. You have an arbitrary db, right? and you'd like to pull that 'in' and into EDM, and use some EF 'flavor' (db, model, code first?) Commented May 6, 2013 at 21:12
  • Yes, i would like to compile entities at runtime ... is that impossible? Commented May 6, 2013 at 22:14
  • 1
    This may be useful to you. Not EF but allows for zero config database first dynamic queries: keroseneorm.codeplex.com Commented May 11, 2013 at 23:18

1 Answer 1

2

I'm an EF fan but this just doesn't fit in IMHO!

I suggest that you just use ADO.NET instead of trying to use EF for your requirement.

However, if you're really against using ADO.NET then maybe one of the micro ORMs out there may be better (e.g. Dapper)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.