public ActionResult Create()
        {
            IViewModelBase viewModel = null;

            AddViewBagCreateEdit(null);
            viewModel = new ContentTranslationCreateOrEditViewModel()
            {
            };
            return(Create <ContentTranslation>("CreateOrEdit", viewModel));
        }
 public ActionResult Edit(ContentTranslationCreateOrEditViewModel vmObj)
 {
     return(UpdateUsingViewModel(vmObj, (o) =>
     {
         //Convert the ViewModel to DB Object (Model)
         var dbObj = db.Set <ContentTranslation>().Where(x => x.Id == vmObj.Id).FirstOrDefault();
         dbObj.Language = vmObj.Language;
         dbObj.Description = vmObj.Description;
         return dbObj;
     }));
 }
 public ActionResult Create(ContentTranslationCreateOrEditViewModel vmObj)
 {
     return(CreateUsingViewModel(vmObj, (parent) =>
     {
         //Convert the ViewModel to DB Object (Model)
         var dbObj = new ContentTranslation()
         {
             Language = vmObj.Language,
             Description = vmObj.Description
         };
         return dbObj;
     }));
 }
        public ActionResult Edit(int?id)
        {
            var           o         = db.Set <ContentTranslation>().Where(x => x.Id == id).FirstOrDefault();
            ViewModelBase viewModel = null;

            if (o != null)
            {
                AddViewBag(o);
                viewModel = new ContentTranslationCreateOrEditViewModel()
                {
                    Language    = o.Language,
                    Description = o.Description
                };
            }
            return(Edit <ContentTranslation>("CreateOrEdit", viewModel));
        }