Is it proper form to extend a model object (e.g. Product) and add a Create() method that inserts into the database? (MVC 5 Entity Framework 6)
<p>So I am currently extending the classes that Entity Framework automatically generated for each of the tables in my database.  I placed some helpful methods for processing data inside these partial classes that do the extending.</p>

<p>My question, however, is concerning the insertion of rows in the database.  Would it be good form to include a method in my extended classes to handle this?  </p>

<p>For example, in the Product controller's Create method have something like this:</p>

<pre><code>[HttpPost]
public ActionResult Create(Product p)
{
    p.InsertThisProductIntoTheDatabase();  //my custom method for inserting into db
    return View();
}
</code></pre>

<p>Something about this feels wrong to me, but I can't put my finger on it.  It feels like this functionality should instead be placed inside a generic MyHelpers.cs class, or something, and then just do this:</p>

<pre><code>var h = new MyHelpers();
h.InsertThisProductIntoTheDatabase(p);
</code></pre>

<p>What do you guys think?  I would prefer to do this the "correct" way.</p>

<hr>

<p>MVC 5, EF 6</p>

<hr>

<p>edit: the InsertThisProductIntoTheDatabase method might look something like:</p>

<pre><code>public partial class Product()
{

    public void InsertThisProductIntoTheDatabase()
    {
         var context = MyEntities();

         this.CreatedDate = DateTime.Now;
         this.CreatedByID = SomeUserClass.ID;
         //some additional transformation/preparation of the object's data would be done here too.  My goal is to bring all of this out of the controller.

         context.Products.Add(this);
    }

}
</code></pre>