public Category GetByUrlSlug(string urlSlug)
        {
            var category = MyDbSet.FirstOrDefault(c => c.UrlSlug == urlSlug);

            return(category);
        }
示例#2
0
        public Tag GetTagByUrlSlug(string urlSlug)
        {
            var tag = MyDbSet.FirstOrDefault <Tag>(t => t.UrlSlug == urlSlug);

            return(tag);
        }