public PLPublisher GetById(int id)
        {
            if (!PLValidation.ValidateId(id))
            {
                return(null);
            }
            var resultBLL = _curPublWorkerService.GetById(id);

            if (resultBLL != null)
            {
                PLPublisher resultPL = new PLPublisher {
                    Id = resultBLL.Id, PublisherName = resultBLL.PublisherName, LicenseNumber = resultBLL.LicenseNumber
                };
                return(resultPL);
            }
            return(null);
        }
Exemple #2
0
        public PLGenre GetById(int id)
        {
            //check id
            if (!PLValidation.ValidateId(id))
            {
                return(null);
            }
            var resultBLL = _curGenrelWorkerService.GetById(id);

            if (resultBLL != null)
            {
                PLGenre resultPL = new PLGenre {
                    Id = resultBLL.Id, GenreName = resultBLL.GenreName, Description = resultBLL.Description
                };
                return(resultPL);
            }
            return(null);
        }