dimanche 11 octobre 2015

Create generic Repository

How can I create a repository object for a custom object? I don't know the CustomEntity type when I am creating repo object.

I am trying something below.

var _unitofWork = new UnitOfWork();
var objRepository = new Repository<Type.GetType("EntityName")>(_unitofWork);

Can anyone help with this?





Aucun commentaire:

Enregistrer un commentaire