public Channel(EntityFramwork.Channel dbChan) { Id = dbChan.id; Title = dbChan.title; Description = dbChan.description; Link = dbChan.link; Url = dbChan.url; PubDate = dbChan.pubDate; LastBuildDate = dbChan.lastBuildDate; Image = dbChan.image; Enclosure = dbChan.enclosure; }
public Item(EntityFramwork.Item dbItem, EntityFramwork.User user) { Id = dbItem.id; IdChannel = dbItem.id_channel; Title = dbItem.title; PubDate = dbItem.pubDate; Description = dbItem.description; GUID = dbItem.guid; Author = dbItem.author; Category = dbItem.category; Comments = dbItem.comments; using (var db = new EntityFramwork.ServerDataContext()) { Read = (from item in db.ItemReads where item.id_item == Id && item.User == user select item).SingleOrDefault() != null; } }