public ActionResult Create(AttributeModel model, bool continueEditing)
 {
     if (ModelState.IsValid)
     {
         var entity = model.MapTo <Attribute>();
         model.Id = _attributeService.InsertAttribute(entity);
         return(continueEditing ? RedirectToAction("Edit", new { id = model.Id }) : RedirectToAction("List"));
     }
     PrepareAttributeModel(model);
     return(View(model));
 }
 public static Attribute ToAttribute(this AttributeModel model)
 {
     return(model.MapTo <AttributeModel, Attribute>());
 }