I want to perform the following query in Entity framework 6. Although i tried converting integer field to strings but it did not worked out.
using (var context = new HospitalEntities())
{
var ibed = from u in context.Employee
where u.EmployeeId == employeeId
select new
{
_empId = u.EmployeeId,
_name =Convert.ToString(u.Code) + u.EmployeeName
};
Model Class:
public class Employee
{
public int EmployeeId { get; set; }
public int Code { get; set; }
public string EmployeeName { get; set; }
}
Please help me. Thanks in advance.