public BlockInfoDto GetBlock(object blockId) { using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey)) { BlockFacade facade = new BlockFacade(uow); BlockInfoDto result = facade.GetBlockInfo(blockId, new BlockInfoConverter()); return(result); } }
public IEnumerable <BlockInfoDto> GetBlocks() { using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey)) { BlockFacade facade = new BlockFacade(uow); List <BlockInfoDto> result = facade.GetBlocksInfo(new BlockInfoConverter()); return(result); } }
public void TestAll() { BlockFacade facade = new BlockFacade(UnitOfWork); List <BlockInfoDto> result = facade.GetBlocksInfo <BlockInfoDto>(new BlockInfoConverter()); if (result != null) { } BlockInfoDto item = facade.GetBlockInfo <BlockInfoDto>(7, new BlockInfoConverter()); }