Set an entity field value from a generic service
<p>I have a generic service that has the basic operations I will need to preform on my entities</p>

<p>a number of my entities have a field <code>IsEnabled</code> </p>

<p>I want to be able to set this field from my generic service</p>

<p>my service is defined as :</p>

<pre><code>public class Service&lt;T&gt; : IService&lt;T&gt; where T : class
</code></pre>

<p>Where IService is</p>

<pre><code>public interface IService&lt;T&gt;
    {
        IPagedList&lt;T&gt; GetPagedList(
            int page = 1,
            Expression&lt;Func&lt;T, bool&gt;&gt; filter = null,
            Func&lt;IQueryable&lt;T&gt;, IOrderedQueryable&lt;T&gt;&gt; orderBy = null,
            params Expression&lt;Func&lt;T, object&gt;&gt;[] include
        );

        IEnumerable&lt;T&gt; GetOrderedList(Func&lt;IQueryable&lt;T&gt;, IOrderedQueryable&lt;T&gt;&gt; orderBy = null);

        bool Create(T entity);

        bool Update(T entity);

        T FindById(int id);

        bool Delete(T entity);

        void Enable(int id, string state);
    }
</code></pre>

<p>I want to put the following into my service:</p>

<pre><code>public void Enable(int id, string state)
        {
            T entity = FindById(id);

            entity.IsEnabled = (state == "true") ? true : false;

            Update(entity);
        }
</code></pre>

<p>But VS complains that T does not contain for IsEnabled</p>

<p>how can i assure it that it does?</p>