public void EdytujPost(int id, string tytul, string tresc, int status) { using (LinqTodbBlogDataContext context = new LinqTodbBlogDataContext()) { var post = context.Posties.Single(p => p.id == id); post.tytul = tytul; post.tresc = tresc; post.status = status; post.data_modyfikacji = DateTime.Now; context.SubmitChanges(); } }