Why does not the code below work (does not delete)?
using (Banco db = new Banco()) {
String strSql = "Delete from Cliente where codcliente=" + Session["_uiUserID"];
db.Cliente.SqlQuery(strSql);
db.SaveChanges();
}
You are not throwing any Exception
and catching the string that is inside the strSql
variable and running directly on the normal working bank.