Cannot convert lambda expression to type 'bool' because it is not a delegate type
When comparing 2 integers in the if statement "if (UserLevelID => dbMinimunlevelID)"
How can I compare a variable that holds a count with another integer?
//Check if user has enough credits to create ClassCharacter
public bool CheckMinimunCreditforClassCharacter(Guid UserID, int ClassCharacterID, int Levelid)
{
bool Results = true;
//Check Character Creation Rules
int dbMinimunlevelID = 0;
bool AdditionalCharactersRequired = false;
int AdditionalCharactersPoints = 0;
var query = (from o in db.ClassCharacters
where o.ClassCharacterID == ClassCharacterID
select o);
foreach (var v in query)
{
dbMinimunlevelID = v.MinimumPoints;
AdditionalCharactersRequired = v.AdditionalCharactersRequired;
AdditionalCharactersPoints = v.AdditionalCharactersPoints;
}
if (dbMinimunlevelID > 0)
{
//Check User existing Characters
int UserLevelID = db.Characters.Where(o => o.UserId == UserID)
.Max(o => o.LevelID);
//************ Here is where the error appears
if (UserLevelID => dbMinimunlevelID)
{
Results = true;
}
else
{
Results = false;
}
}
return Results;
}