Organizing Levels of Abstraction
<p>I have an SQL Server database with tables.</p>

<p>On top of this, I have a class for each table that uses LINQ and has Add, Remove, Get, Update functions.</p>

<p>On top of that I want to have more project specific methods.</p>

<p>For example, one of my highest level function is to Assign a task to an employee.</p>

<p>My thought would be to have another set of classes which would have this functionality, for example, the initial Task class has:</p>

<pre><code>    public static IEnumerable&lt;Task&gt; GetAll(Schedule schedule)
    {
        KezberPMDBDataContext db = new KezberPMDBDataContext();
        return from p in db.Tasks
               where p.ScheduleID == schedule.ScheduleID
               select p;
    }
</code></pre>

<p>So for example, to assign a task, I need to GetUnscheduledTasks. I could have:</p>

<pre><code>    public static IEnumerable&lt;Task&gt; GetUnscheduled()
    {
       return Data.Tasks.GetAll(emptySchedule);
    }
</code></pre>

<p>I'm basically trying to have: low level exchange data with mid level, and top level exchange data with mid level.</p>

<p>How should I organize or refactor my code to keep it clean and modular?</p>

<p>Thanks</p>
