1

wondering if you could point me to some examples if any or advice on how to build a plugin architecture using EF6.

This is my requirements. I have will have 6 plugins all having different databases but all return the same views.column name. I was thinking of having the following dlls

  1. Plugins.One
  2. Plugins.Two
  3. Plugins.Three etc..

Than via Dependency Injection (injecting repository)call

  • Plugins.Services.dll (

Than this services.dll depending on the repository type would call

  1. Plugins.One.Dal.dll (this will contain the database first edmx file for this plugin)
  2. Plugins.Two.Dal.dll (this will contain the database first edmx file for this plugin)
  3. Etc...

What do you think ?Would you do the above.

Any suggestions?

user9969
  • 15,632
  • 39
  • 107
  • 175
  • Are those plugins operating the same EDM, or EDM differs for each plugin? This confused me: "but all return the same views.column name". – Dennis Oct 29 '13 at 07:18
  • Try looking at http://stackoverflow.com/a/8901068/1241400 it explains how to use MEF (which i would recommend for building plugins) and EntityFramework. – Matija Grcic Oct 29 '13 at 07:19
  • @Dennis Hi each plugins will have different databases but we will build sql views on top of them so they return the same columns name,so that our internal mapping will work without modification for each plugin.Basically these plugins are used for migrating data.Each customer has different database but our views will return the same column names for all of them.So all the plugins will have the same method name and queries the only thing that will differ is the connection string.May be will be much simpler with Ado.Net no need of edmx file and I could have one dll(Services)call diff databases – user9969 Oct 29 '13 at 07:28
  • @user231465: if the views will have the same schema in every database, then you'll need single EDM. So, your plugins will differ with connection string only. Do you really need them? – Dennis Oct 29 '13 at 07:32
  • @Dennis each database will have for sure different table names and data.But the view Names and columnName returned will be the same so that our internal mapping will work out of the box.How can I have only one single EDM?If i do database first surely the wizard will want me to point to a database to generate the views.May be I am missing the obvious.sorry – user9969 Oct 29 '13 at 07:53
  • You can have it generated from any DB, is they are the same, there are no issues here. So you'll get a single data access component, initialized from a certain plugin connection string. – mikalai Oct 30 '13 at 06:47

0 Answers0