public Post getPost(int PostID)
{
try
{
using (var ctx = new PostContext())
{
Post oldPost = ctx.Posts.Find(PostID);
return oldPost;
}
}
catch (Exception)
{
return null;
}
}