title: Why my string value return as Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[System.String]
body: <p>When I try to get value of <code>SenderName</code> and <code>ReceiverName</code>
  which are <code>IQueryable&lt;string&gt;</code> I see string
  <code>Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[System.String]</code> on view.</p>
  <p>Why I can't see my <code>string</code> value on db? Thanks.</p>
  <p>I am using <code>UnitOfWork</code> pattern.</p>
  <p>I can not reach the value of string my model properties</p>
  <pre class="lang-cs prettyprint-override"><code>    using DAL;
      using Data.Model;
      using Microsoft.AspNetCore.Authorization;
      using Microsoft.AspNetCore.Mvc;
      using Microsoft.AspNetCore.Mvc.Rendering;
      using Microsoft.Extensions.Logging;
      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Security.Claims;
      using System.Threading.Tasks;
      using TechEnabledSales.Models;
  
      namespace TechEnabledSales.Controllers
      {
          [Authorize(Roles = &quot;100,200,1000&quot;)]
          public class InterviewController : Controller
          {
              private readonly IUnitOfWork _uow;
              private readonly ILogger&lt;InterviewController&gt; _log;
  
              public InterviewController(IUnitOfWork uow, ILogger&lt;InterviewController&gt; logger)
              {
                  _uow = uow;
                  _log = logger;
              }
  
              public IActionResult Index()
              {
                  int.TryParse(this.User.FindFirstValue(&quot;ClinetId&quot;), out int clientId);
  
                  var repo = _uow.GetRepository&lt;Interview&gt;();
                  var model = new List&lt;InterviewVM&gt;();
                  model = repo.Single(predicate: f =&gt; f.ClientId == clientId)
                      .Select(s =&gt; new InterviewVM
                      {
                          SenderId = s.SenderId,
                          ClientId = s.ClientId,
                          Id = s.Id,
                          CreateDate = s.CreateDate,
                          Message = s.Message,
                          ReceiverId = s.ReceiverId,
                          ReceiverName = GetUserName(s.ReceiverId ?? 0),
                          SenderName = GetUserName(s.SenderId ?? 0)
                      }).ToList();
  
                  ViewBag.Clients = null;
                  if (this.User.IsInRole(&quot;200&quot;))
                  {
                      var repoClient = _uow.GetRepository&lt;Clients&gt;();
                      var clients = repoClient.GetList(size: 2000, orderBy: o =&gt; o.OrderBy(o2 =&gt; o2.Name)).Items
                              .Select(x =&gt; new SelectListItem()
                              {
                                  Text = x.Name,
                                  Value = x.Id.ToString()
                              });
  
                      ViewBag.Clients = new SelectList(clients, &quot;Value&quot;, &quot;Text&quot;, null);
                  }
  
                  return View(model);
              }
  
              [HttpPost]
              public IActionResult PostMessage(string message, int clientId2 = 0)
              {
                  int.TryParse(this.User.FindFirstValue(ClaimTypes.NameIdentifier), out int userId);
  
                  int.TryParse(this.User.FindFirstValue(&quot;ClinetId&quot;), out int clientId);
  
                  var repo = _uow.GetRepository&lt;Interview&gt;();
                  var model = new Interview();
                  model.ClientId = this.User.IsInRole(&quot;100&quot;) ? clientId : clientId2;
                  model.Message = message;
                  model.SenderId = this.User.IsInRole(&quot;200&quot;) ? userId : 0;
                  model.ReceiverId = this.User.IsInRole(&quot;100&quot;) ? userId : 0;
                  model.CreateDate = DateTime.Now;
                  repo.Add(model, true);
                  if (this.User.IsInRole(&quot;200&quot;))
                      return Redirect(&quot;/Home/Index&quot;);
                  else
                      return RedirectToAction(&quot;Index&quot;);
              }
  
              private IQueryable&lt; string&gt; GetUserName(int id)
              {
                  if (id == 0)
                      return null;
  
                  var repo = _uow.GetRepository&lt;Users&gt;();
                  var model = repo.Single(predicate: u =&gt; u.Id == id).Select(s =&gt; string.Join(&quot; &quot;, s.FirstName, s.LastName));
  
                  return model;
              }
          }
      }
  
  
      using System;
      using System.Collections.Generic;
      using System.Data.Common;
      using Microsoft.EntityFrameworkCore;
  
      namespace DAL
      {
          public interface IUnitOfWork : IDisposable
          {
              DbContext GetContext();
              List&lt;T&gt; RawSqlQuery&lt;T&gt;(string query, Func&lt;DbDataReader, T&gt; map);
              void ExecuteSql(string query);
  
              IRepository&lt;TEntity&gt; GetRepository&lt;TEntity&gt;() where TEntity : class;
              IRepositoryAsync&lt;TEntity&gt; GetRepositoryAsync&lt;TEntity&gt;() where TEntity : class;
  
              int SaveChanges();
          }
  
          public interface IUnitOfWork&lt;TContext&gt; : IUnitOfWork where TContext : DbContext
          {
              TContext Context { get; }
          }
      }
  
      using DAL.Paging;
      using Microsoft.EntityFrameworkCore.Query;
      using System;
      using System.Linq;
      using System.Linq.Expressions;
  
      namespace DAL
      {
          public interface IReadRepository&lt;T&gt; where T : class
          {        
              T Search(params object[] keyValues);
              IQueryable&lt;T&gt; Query(string sql, params object[] parameters);
  
              IQueryable&lt;T&gt; Single(Expression&lt;Func&lt;T, bool&gt;&gt; predicate = null,
                  Func&lt;IQueryable&lt;T&gt;, IOrderedQueryable&lt;T&gt;&gt; orderBy = null,
                  Func&lt;IQueryable&lt;T&gt;, IIncludableQueryable&lt;T, object&gt;&gt; include = null,
                  bool disableTracking = true);
  
              IPaginate&lt;T&gt; GetList(Expression&lt;Func&lt;T, bool&gt;&gt; predicate = null,
                  Func&lt;IQueryable&lt;T&gt;, IOrderedQueryable&lt;T&gt;&gt; orderBy = null,
                  Func&lt;IQueryable&lt;T&gt;, IIncludableQueryable&lt;T, object&gt;&gt; include = null,
                  int index = 0,
                  int size = 50,
                  bool disableTracking = true);
  
              IPaginate&lt;TResult&gt; GetList&lt;TResult&gt;(Expression&lt;Func&lt;T, TResult&gt;&gt; selector,
                  Expression&lt;Func&lt;T, bool&gt;&gt; predicate = null,
                  Func&lt;IQueryable&lt;T&gt;, IOrderedQueryable&lt;T&gt;&gt; orderBy = null,
                  Func&lt;IQueryable&lt;T&gt;, IIncludableQueryable&lt;T, object&gt;&gt; include = null,
                  int index = 0,
                  int size = 50,
                  bool disableTracking = true) where TResult : class;
          }
      }
  </code></pre>