Exemple #1
0
 public bool ExistFile(QueryFileParameter param)
 {
     using (var context = base.CreateContext())
     {
         var q = from t in context.FileStorages
                 where t.FileKey == param.FileKey
                 select t;
         return(q.Any());
     }
 }
Exemple #2
0
 public QueryFilePathResult QueryFilePath(QueryFileParameter param)
 {
     using (var context = base.CreateContext())
     {
         var q = from t in context.FileStorages
                 where t.FileKey == param.FileKey
                 select new QueryFilePathResult
         {
             VirtualPath     = t.VirtualPath,
             PhysicalPath    = t.PhysicalPath,
             ServerAuthority = t.ServerAuthority
         };
         return(q.Single());
     }
 }
Exemple #3
0
 public QueryFileResult QueryFile(QueryFileParameter param)
 {
     using (var context = base.CreateContext())
     {
         var q = from t in context.FileStorages
                 where t.FileKey == param.FileKey
                 select new QueryFileResult
         {
             FileKey    = t.FileKey,
             FileName   = t.FileName,
             CreateDate = t.CreateDate
         };
         return(q.Single());
     }
 }
        public QueryFileResult QueryFile(QueryFileParameter param)
        {
            var repository = new InfrastructureRepository();

            return(repository.QueryFile(param));
        }