public void MoveFromBlackList(Guid badEntityID) { if (BlackLists.Where(bl => bl.BlackListID == badEntityID).SingleOrDefault() == null) { return; } BlackLists.DeleteOnSubmit(BlackLists.Where(bl => bl.BlackListID == badEntityID).SingleOrDefault()); SubmitChanges(); }
public void MoveToBlackList(Guid badEntityID, string reason) { if (BlackLists.Where(bl => bl.BlackListID == badEntityID).SingleOrDefault() != null) { return; } BlackLists.InsertOnSubmit(new BlackList { BlackListID = badEntityID, Date = DateTime.Now, Description = reason }); SubmitChanges(); }