public FileEntity Read(int fileId) { using (DatabaseContext context = CreateDatabaseContext()) { FileRepository fileRepository = new FileRepository(context); VFile file = fileRepository.GetLicensedFile(fileId); if (file == null) { return(null); } return(ObjectMapper.Map <FileEntity>(file)); } }
public VEntityFile(TEntity entity, VFile file) { Entity = entity; File = file; }