GetEntityService() public method

public GetEntityService ( ) : IEntityService
return IEntityService
     private EntityServiceFactory m_factory; // Dependency
 
     public void SomeOperation() // Method must be concurrent, so create new IEntityService each call
     {
         IEntityService entitySvc = m_factory.GetEntityService();
         Entity entity = entitySvc.GetEntity(...);
         // Do some work with entity
         entitySvc.Save(entity);
     }
Esempio n. 2
0
 public IEntityService GetEntityService(string tableName)
 {
     return(EntityServiceFactory.GetEntityService(DataBase.Entities.Find(x => x.Name == tableName), _storage));
 }