コード例 #1
0
ファイル: BlogController.cs プロジェクト: diegovar/Website
 //
 // GET: /Blog/
 public virtual ActionResult Index(string blogName)
 {
     var b = new Blog
     {
         Name = blogName,
         Posts = new List<Post>
         {
             new Post
             {
                 Name = "Primer post!",
                 Date = DateTime.Now,
                 Tags = new List<string>
                 {
                     "primer-post", "hola"
                 },
                 Comments = new List<Comment>
                 {
                     new Comment
                     {
                         Id = "2", Email = "*****@*****.**", PosterId = "5", PosterName = "Juan de los palotes", Text = "This seems to be working\r and even <b>some tags</b> work"
                     }
                 }
             }
         }
     };
     return View(b);
 }
コード例 #2
0
ファイル: BlogController.cs プロジェクト: diegovar/Website
 //
 // GET: /Blog/
 public virtual ActionResult Index(string blogName)
 {
     var b = new Blog
     {
         Name = blogName,
         Posts = new List<Post>
         {
             new Post
             {
                 Name = "Primer post!",
                 Date = DateTime.Now,
                 Content = "OMG <strong>Some tags work</strong> I might be able to link to <a href='http://www.google.com'>Google</a>",
                 Tags = new List<string>
                 {
                     "primer-post",
                     "hola"
                 },
                 Tracks = new List<Track>
                 {
                     new Track
                     {
                         Id = "0",
                         ArtistName = "Daft Punk",
                         Name = "Derezzed",
                         Url = Links.Content.sounds.Daft_Punk___Derezzed_mp3
                     }
                 },
                 Comments = new List<Comment>
                 {
                     new Comment
                     {
                         Id = "2", Email = "*****@*****.**", PosterId = "5", PosterName = "Juan de los palotes", Text = "This seems to be working\r and even <b>tags</b> don't work"
                     }
                 }
             }
         }
     };
     return View(b);
 }