public int Count(string predicate, Guid identityWorkId)
 {
     using var context     = new CotorraContext(ConnectionManager.ConfigConnectionString);
     using var iRepository = new RepositoryStorage <T, CotorraContext>(context, true);
     return(iRepository.GetCount(predicate, identityWorkID: identityWorkId));
 }
 public int Count(Expression <Func <T, bool> > predicate, Guid identityWorkId)
 {
     using var context     = new CotorraGeneralContext(ConnectionManager.ConfigConnectionStringGeneral);
     using var iRepository = new RepositoryStorage <T, CotorraGeneralContext>(context, true);
     return(iRepository.GetCount(predicate, identityWorkID: identityWorkId));
 }