title: If statement and assignments in lambda expressions
body: <p>I have a lambda statement that has a mapping like this:</p>
  
  <pre><code>public enum Status
  {
      Completed,
      InComplete,
      Ok
  }
  </code></pre>
  
  <p>Query:</p>
  
  <pre><code>var courses = query.Select(c =&gt; new SomeModel
        {
            Status = c.someQuery() ? Status.Completed : Status.Ok
        });
  </code></pre>
  
  <p>So I want Status to have multiple if statements and not just a ternary operation. For eg.</p>
  
  <pre><code>var courses = query.Select(c =&gt; new SomeModel
        {
            Status = if(c.someQuery())
                     { 
                         return Status.Completed;
                     }
                     else if(c.someOtherQuery())
                     {
                         return Status.InComplete;
                     }
                     else if(c.someOtherQuery1())
                     {
                         return Status.Ok;
                     }
        });
  </code></pre>
  
  <p>So how do I accomplish something like this? I am using Entity framework ORM.</p>