I accidentally revisited this topic today, and was able to answer my "Can .NET's System.Console be configured to print Right To Left?" question from a year ago - here.
Keeping track of interesting places I put my feet on in the software development world.
Search This Blog
Thursday, July 28, 2016
Thursday, July 7, 2016
Dealing with EF Connection Timeouts/Connection lost issues using Connection Resilience/Retry Logic built in support (EF onwards)
Upon facing connection timeouts/connection lost issues in working with EF, instead of trying brute force methods such as wrapping your connection instance in a for statement or alike, the best practice is to use Connection Resilience/Retry Logic (EF onwards) support, which provides more sophisticated retry strategy implementations, shipped in.
Sunday, July 3, 2016
Adding objects from different schemas using Entity Framework with Oracle
At first, it looked like there was is no Entity Framework support to adding objects (say, tables) created in schemas other than the one used in the database connection.
But turned out it is possible. Stackoverflow will list some "workarounds" , but there is no need to - because SO lists one post that gives the exact solution for this problem, and it looks great.
Summarizing it:
You can either add more schemas under which search for objects to add during the creation of the Ado.net object (while adding the connection) - or by modifying the existing connection in the Server Explorer in Visual Studio.
If you are adding the ADO.NET object, you need the connection definition window above - and if you already have your ADO.NET object there, go to Visual Studio -> View -> Server Explorer, search for the desired connection under Data Connections and right click it. Then choose Modify. You will get the window above.
The steps to follow are:
But turned out it is possible. Stackoverflow will list some "workarounds" , but there is no need to - because SO lists one post that gives the exact solution for this problem, and it looks great.
Summarizing it:
You can either add more schemas under which search for objects to add during the creation of the Ado.net object (while adding the connection) - or by modifying the existing connection in the Server Explorer in Visual Studio.
If you are adding the ADO.NET object, you need the connection definition window above - and if you already have your ADO.NET object there, go to Visual Studio -> View -> Server Explorer, search for the desired connection under Data Connections and right click it. Then choose Modify. You will get the window above.
The steps to follow are:
- Select the Filter tab
- Click the 3 dots singled out, and add the schemas you want to be included by EF when searching for objects to add to the model.
- After you are done with step 1, click the Update button singled out in the screenshot.
That's it. You can right click your edmx file, click Update Model From Database, and you will now have, under Tables, the tables listed by their schema.
Subscribe to:
Posts (Atom)