This project is read-only.

Multiple Tables

Topics: Writing modules
Jul 15, 2013 at 11:19 PM
I have a module where I am creating multiple tables using SchemaBuilder.CreateTable() inside the Create() method.

Since I need to pass IRepository<T> to the module's constructor, I also need to be able to use IRepository.Create() method for each of the tables I am creating. The problem I am seeing is that the constructor for the Module I am crating only accepts a single IRepository<T> record. Since I am actually working with 3 tables how do I interact with the IRepository object.

Jul 15, 2013 at 11:24 PM
Edited Jul 15, 2013 at 11:25 PM
Inject 3 repositories: one for each table. E.g.
ctor (IRepository<RecordA> repositoryA, IRepository<RecordB> repositoryB, IRepository<RecordC> repositoryC) { }
Jul 15, 2013 at 11:47 PM
Perfect. Thanks!