In my windows phone 7 app i have database-class generated by sqlmetal. in addition, i have class that helps to work with this database.
public static IList<Task> GetTasks()
{
IList<Task> tasks = new List<Task>();
using (var context = new MyDBContext(ConnectionString))
{
tasks = (from emp in context.Tasks select emp).ToList();
}
return tasks;
}
this code return all posts from the database.
My questions:
- 1) How I can get posts, for example, only with a specific date (datetime) or ID(int)?
- 2) Is there any way to delete posts from the database?