示例#1
0
 public List <AttachmentModel> AttachmentGet(string moduleId, int masterId)
 {
     try
     {
         var list = (from l in _db.SP_SYS_ATTACHMENT_GET(moduleId, masterId)
                     select new AttachmentModel()
         {
             AttachId = l.AttachId,
             ModuleId = l.ModuleId.ToString(),
             MasterId = l.MasterId,
             Name = l.FileName,
             Path = l.FilePath,
             Type = l.FileType,
             Size = l.FileSize
         }).ToList();
         return(list);
     }
     catch (Exception ex)
     {
         LogHelper.Error("CommonRepository: AttachmentInsert: " + ex.Message + " Exception: " + ex.InnerException.Message);
         return(null);
     }
 }