public void DodajKomentarz(int idPosta, string autor, string tresc, int status)
{
using (LinqTodbBlogDataContext context = new LinqTodbBlogDataContext())
{
Komentarze k = new Komentarze
{
id_posta = idPosta,
autor = autor,
tresc = tresc,
status = status,
data_dodania = DateTime.Now
};
context.Komentarzes.InsertOnSubmit(k);
context.SubmitChanges();
}
}