I have a login page that Username is the emaloyee ID which is an Integer. however to validate my loging I need to convert it to string, but it continuesly give me same error.
I need help here: var user = db.EMPLOYEEs.Where(u => u.EMP_ID == model.EMP_ID && u.EMP_PASSWORD == model.EMP_PASSWORD).FirstOrDefault();
I have tried all of these but sill give me same error :
string s = i.ToString();
string s = Convert.ToString(i);
string s = string.Empty + i;
string s = new StringBuilder().Append(i).ToString();

I get another error down on
serializeModel.roles = user.RoleROLE_ID; error: Cannot implicitly convert type 'int' to 'string[]'
what I suppose to do with this one?

here is my code :
[HttpPost]
public ActionResult Login(LoginModel model, string returnUrl = "")
{
if (ModelState.IsValid)
{
int modelID = int.Parse(model.EMP_ID);
var user = db.EMPLOYEEs.Where(u => u.EMP_ID == modelID && u.EMP_PASSWORD == model.EMP_PASSWORD).FirstOrDefault();
if ( user !=null)
{
var roles = db.EMPLOYEEs.Select(m => m.RoleROLE_ID).ToArray();
CustomPrincipalSerializeModel serializeModel = new CustomPrincipalSerializeModel();
serializeModel.UserId = user.EMP_ID;
serializeModel.FirstName = user.EMP_FIRST_NAME;
serializeModel.LastName = user.EMP_LAST_NAME;
serializeModel.roles = user.RoleROLE_ID;