using System; using System.Linq; namespace Website.DataAccess { [Serializable] public partial class Content : IContent { public T GetMetaData(string key) { return Parse.To(this[key]); } public string this[string key] { get { return (from m in MetaDatums where m.Key == key select m.Value).FirstOrDefault() ?? string.Empty; } set { throw new NotImplementedException(); } } public static Content FromIContent(IContent c) { return new Content { ID = c.ID, ParentID = c.ParentID, Title = c.Title, Html = c.Html }; } } }