Пример #1
0
        public static Topic GetFromReader(umbraco.DataLayer.IRecordsReader reader)
        {
            var topic = new Topic
                            {
                                Id = reader.GetInt("id"),
                                ParentId = reader.GetInt("parentId"),
                                MemberId = reader.GetInt("memberId"),
                                Replies = reader.GetInt("replies"),
                                Title = reader.GetString("title"),
                                Body = reader.GetString("body"),
                                LatestReplyAuthor = reader.GetInt("latestReplyAuthor"),
                                Created = reader.GetDateTime("created"),
                                Updated = reader.GetDateTime("updated"),
                                UrlName = reader.GetString("urlName"),
                                Locked = reader.GetBoolean("locked")
                            };

            return topic;
        }
Пример #2
0
        public static Topic GetFromReader(umbraco.DataLayer.IRecordsReader dr)
        {
            Topic t = new Topic();
            t.Id = dr.GetInt("id");
            t.ParentId = dr.GetInt("parentId");
            t.MemberId = dr.GetInt("memberId");
            t.Replies = dr.GetInt("replies");
            t.Title = dr.GetString("title");
            t.Body = dr.GetString("body");
            t.LatestReplyAuthor = dr.GetInt("latestReplyAuthor");
            t.Created = dr.GetDateTime("created");
            t.Updated = dr.GetDateTime("updated");

            t.UrlName = dr.GetString("urlName");

            t.Locked = dr.GetBoolean("locked");

            return t;
        }