public User FindByUsername(string userName) { try { return db.UserSet.Single(u => u.Username == userName); } catch (Exception) { return null; } }