Celebrating 8 Successful Years
+1 (315)-715-8489

How to Use a EDMX file for multiple DB having same type of table and schema

1.There are 3 database are have same type of table for 3 application.

Tables are
2.Another database to manage the applications  having a table to store the Application ID ,server name, DBname, Password and username  of application database.

3. Create an EDMX file for the Application that will work as a template and another for the DB to manage the Application


4.While creating the EDMX file the class  generate by EDMX file is

5. Create a class of same class name as above with a parameterized constructor to pass the connection string to this for change the Db connection string dynamically.

6. Based on the application id we will get the database detail and pass to the function to change the connection string.

Copy the connection  string for applicationDB from web.config file and put that in a string and change the server name, DBname, Password and username  of application based on Appid.

7.GetuserDBbyAppid() function we will get the entity for the particular DB .then we can use the Entity Framework to curd operation on that DB.

Need not required to create EDMX file for same type of database which are situated in different servers and all server can manage through an application means we can create users in base application so that user can login in assigned application.

Pradeep - Software Developer

Compare book Prices

Application that compares books price from online vendors



Type in the ISBN number  and get the list of all vendors selling that book online, with prices from lowest to highest. on clicking the buy button you will be redirected to the vendors website and could buy the book from there.

this app save a lot of time and money for the buyers, as this app does everything for you:
  1. Searches for the vendors who are selling the required book.
  2. Sorts the price from lowest to highest.
  3. Gives you the direct link to the billing page of vendors website.


Nandu - UI/UX Designer

Get In Touch

Presentations

© Copyright 2016 by SKG Infosolution. All rights reserved

Top