Exemple #1
0
 public static T Fetch <T, TE>(T modelObject, TE dbEntity, ObjectFactoryBase <T, TE> objectFactory, Action <ObjectFactoryBase <T, TE> > actionFetch = null)
 {
     objectFactory.ModelObject = modelObject;
     objectFactory.DbEntity    = dbEntity;
     if (actionFetch != null)
     {
         actionFetch(objectFactory);
     }
     else
     {
         objectFactory.Fetch();
     }
     return(objectFactory.ModelObject);
 }
Exemple #2
0
 private static T GetAndFetch <T, TE>(object id, ObjectFactoryBase <T, TE> objectFactory)
 {
     objectFactory.Get(id);
     objectFactory.Fetch();
     return(objectFactory.ModelObject);
 }