Initial commit

This commit is contained in:
Daniel Cortes
2020-05-22 01:32:58 -04:00
commit 7fbf91f8b1
319 changed files with 285697 additions and 0 deletions

30
Proyecto/index.aspx.cs Executable file
View File

@@ -0,0 +1,30 @@
using DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HeyRed.MarkdownSharp;
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Entities entities = new Entities();
List<Post> posts;
string query = Request.QueryString["query"];
if ( query == null )
{
posts = entities.Posts.ToList();
}
else
{
posts = (from p in entities.Posts where p.title.Contains(query) || p.user.username.Contains(query) || p.markdown.Contains(query) select p).ToList();
}
post_repeater.DataSource = posts ;
post_repeater.DataBind();
}
}