public void UsunTagiPostu(int idPosta)
{
using (LinqTodbBlogDataContext db = new LinqTodbBlogDataContext())
{
try
{
var lista = from a in db.Tagis where a.id_posta == idPosta select a;
db.Tagis.DeleteAllOnSubmit(lista);
db.SubmitChanges();
}
catch (Exception)
{ throw new Exception("Wystąpił błąd podczas usuwania tagów"); }
}
}