How i can create a generic datacontext on linq means If database change i don’t have to change anything on linq datacontext.
Please specify the code or link
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you need this level of dynamic querying, LINQ is probably the wrong technology. One of LINQ’s major benefits is static typing – which is usually a plus. Misspell a column in your code and you’ll get a compile-time error rather than a run-time error.
But if you need to be able to handle arbitrary changes to the database schema without a recompilation, you’ll be fighting the API. Go instead with standard ADO.NET instead (DataReaders, DataAdapters, etc).