Can someone improve this code? public bool CheckPlace(string State, string City)
{
    TestDataContext data = new TestDataContext();
    bool IsKochi = new bool();
    if (!string.IsNullOrEmpty(State) &amp;&amp; !string.IsNullOrEmpty(City))
    {
        var Place = (from a in data.Places where a.State == State || a.City == City select a.Place).ToList();
        if (Place != null)
        {
            foreach (var placeName in Place)
            {
                if (placeName.ToString().ToLower() == "kochi")
                {
                    IsKochi = true;
                    break;
                }
                else
                {
                    IsKochi = false;
                }
            }
        }
    }

    return IsKochi;
}
public bool CheckPlace(string State, string City)
{
    if (string.IsNullOrEmpty(State) || string.IsNullOrEmpty(City))
    {
        return false;
    }

    using (var data = new TestDataContext())
    {
        var ret = data.Places.Where(a =&gt; (a.State == State || a.City == City)).Select(a =&gt; a.Place).ToList().Any(x =&gt; x.ToString().ToLower() == "kochi");

        return ret;
    }
}


If the Place have a string property what can be use at the "is kochi" check then use that in the Any() and leave out the .ToList().

Instantiating the TestDataContext() in this method is bad (can not test the method) please inject it as method or class constructor parameter (you can inject a lambda for instantiating it also).

(Syntax errors maybe exists in my code [powered by Notepad].)