title: split field a string in a linq
body: <p>I tried in different ways to accomplish this but I can make it work I have a class called <code>CampoConfiguracionVista</code> Defined like this</p>
  
  <pre><code>public class CampoConfiguracionVista
  {
      public CampoConfiguracionVista() 
      { 
  
      }
  
      public int IDCampo { get; set; }
      public int IDConfiguracion { get; set; }
      public string Nombre { get; set; }
      public bool ValidationEspecial { get; set; }
      public bool Requerido { get; set; }
      public int IDTipodato { get; set; }
      public int? minimo { get; set; }
      public int? maximo { get; set; }
      public string[] valores { get; set; }
  }
  </code></pre>
  
  <p>And I have linq where I have i field called <code>Valores</code> which contains an string value separate by <code>;</code> So What to I want to Accomplish it's split this field value into a string array I tried in this two ways :</p>
  
  <p><strong>first: all in one linq</strong></p>
  
  <pre><code>    var query = (from T in db.ConfiguracionCampo
               where T.IDTipificacion == idTipificacion
               &amp;&amp; T.Campo.Activo == true
               select new CampoConfiguracionVista()
               {
                   IDCampo = T.Campo.IDCampo,
                   IDTipodato = T.IDTipodato,
                   ValidationEspecial = T.ValidationEspecial,
                   minimo = T.minimo,
                   maximo = T.minimo,
                   Requerido = T.Requerido,
                   Nombre = T.Campo.Nombre,
                   valores = T.Valores.Split(';')
               }).ToList();
  </code></pre>
  
  <p><strong>Second: I think that the problem was the linq can't translate the split to sql so i made two linqs like this *</strong></p>
  
  <pre><code>var query = (from T in db.ConfiguracionCampo
                           where T.IDTipificacion == idTipificacion
                           &amp;&amp; T.Campo.Activo == true
                           select T);
  
  var camposConfigurados = (from D in query select D).Select(C =&gt; new CampoConfiguracionVista()
              {
                  IDCampo = C.Campo.IDCampo,
                  IDTipodato = C.IDTipodato,
                  ValidationEspecial = C.ValidationEspecial,
                  minimo = C.minimo,
                  maximo = C.minimo,
                  Requerido = C.Requerido,
                  Nombre = C.Campo.Nombre,
                  valores = C.Valores.Split(';')
              }).ToList();
  </code></pre>
  
  <p>What am I doing wrong??</p>