public void Delete(int id) { UserProfile userProfile = _db.UserProfiles.Find(id); if (userProfile != null) { _db.CallSpDeleteUser(id); //directly call the stored-procedure-method from LLBLGen auto generated class HIMSDataContext } }
public int DeleteUser(int userId) //method is useless. I did it while try to do the same code as in a Sample (Yauheni) { int rowsAffectedToDb = db.CallSpDeleteUser(userId); return(rowsAffectedToDb); }