Exemple #1
0
        internal static object GetEntityFor(Type collectionEntityType, object typedId, Type idType)
        {
            object entityRepository = GenericRepositoryFactory.CreateEntityRepositoryFor(collectionEntityType, idType);

            return(entityRepository.GetType()
                   .InvokeMember("Get", BindingFlags.InvokeMethod, null, entityRepository, new[] { typedId }));
        }
Exemple #2
0
        private object GetEntityFor(object typedId, Type idType)
        {
            object entityRepository = GenericRepositoryFactory.CreateEntityRepositoryFor(propertyType, idType);

            return(entityRepository.GetType()
                   .InvokeMember("Get", BindingFlags.InvokeMethod, null, entityRepository, new[] { typedId }));
        }