Example #1
0
 public static List <string> GetPublisherNameList()
 {
     if (publisherList == null || publisherList.Count == 0)
     {
         publisherList = PublisherDao.Where(n => n.IsDeleted == false).ToList();
     }
     return(publisherList.Select(n => n.Name).ToList());
 }
Example #2
0
 public static List <PublisherDto> GetAllNotDeletedPublishers()
 {
     if (allNotDeletedPublishers == null || allNotDeletedPublishers.Count == 0)
     {
         allNotDeletedPublishers = PublisherDao.Where(n => n.IsDeleted == false).ToList();
     }
     return(allNotDeletedPublishers);
 }
Example #3
0
        public static int GetPublisherId(string name)
        {
            if (publisherList == null || publisherList.Count == 0)
            {
                publisherList = PublisherDao.Where(n => n.IsDeleted == false).ToList();
            }
            PublisherDto dto = publisherList.FirstOrDefault(n => n.Name.Equals(name));

            if (dto == null)
            {
                dto = PublisherDao.Where(n => n.Name.Equals(name)).ToList().FirstOrDefault();
            }
            if (dto == null)
            {
                return(0);
            }
            else
            {
                return(dto.PublisherId);
            }
        }