public void EditArticleType(ArticleTypes articleType)
        {
            var originalArticleType = (from at in _dataModel.ArticleTypes1 where at.articleTypeId == articleType.articleTypeId select at).First();

            _dataModel.ApplyCurrentValues(originalArticleType.EntityKey.EntitySetName, articleType);
            _dataModel.SaveChanges();
        }
 /// <summary>
 /// Create a new ArticleTypes object.
 /// </summary>
 /// <param name="articleTypeId">Initial value of the articleTypeId property.</param>
 public static ArticleTypes CreateArticleTypes(global::System.Int32 articleTypeId)
 {
     ArticleTypes articleTypes = new ArticleTypes();
     articleTypes.articleTypeId = articleTypeId;
     return articleTypes;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ArticleTypes1 EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToArticleTypes1(ArticleTypes articleTypes)
 {
     base.AddObject("ArticleTypes1", articleTypes);
 }
 public void CreateArticleType(ArticleTypes articleType)
 {
     _dataModel.AddToArticleTypes1(articleType);
     _dataModel.SaveChanges();
 }
 public ActionResult Edit(ArticleTypes articleType)
 {
     _articleTypeService.EditArticleType(articleType);
     return RedirectToAction("Index");
 }
 public ActionResult Create(ArticleTypes articleType)
 {
     _articleTypeService.CreateArticleType(articleType);
     return RedirectToAction("Index");
 }