예제 #1
0
        public BlockInfoData GetBlockInfo(object instanceId)
        {
            BlockInfoData result = null;

            RepositoryExceptionWrapper.Wrap(GetType(), () =>
            {
                ICriteria query = CurrentSession.CreateCriteria <BlockInfoData>();
                query.AddExpressionEq <BlockInfoData, object>(o => o.Id, instanceId);
                result = query.UniqueResult <BlockInfoData>();
            });

            return(result);
        }
예제 #2
0
        public IServiceQueryResult <BlockInfoData> GetBlockInfo(object instanceId)
        {
            BlockInfoData result = Repository.GetBlockInfo(instanceId);

            return(ServiceResultFactory.BuildServiceQueryResult <BlockInfoData>(result));
        }