I am really not sure where this error is coming, if it's from the database or the backend. I am not even sure where to start to look
{
List<Data.Models.UserInfo> users = new List<Data.Models.UserInfo>();
using (CEntities dbContext = new CEntities())
{
List<User> entities = new List<User>();
entities = dbContext.User.Where(c => !string.IsNullOrEmpty(c.LastName)).ToList();
foreach (var entity in entities)
{
users.Add(new Data.Models.UserInfo(entity));
}
}
return Json(users);
}
catch (Exception e)
{
logger.Error(e);
return Content(HttpStatusCode.InternalServerError, new { Error = e.Message });
}