using (MyEntityDataContext dc = new MyEntityDataContext(SPContext.Current.Web.Url))

{

var items = from item in dc.MyList.ToList()

select item;

dc.MyList.DeleteAllOnSubmit(items);

dc.SubmitChanges();

}

Advertisements