public static ActivityViewModel ConvertToActivityModel(OnboardActivity onboardactivity) { var activity = new ActivityViewModel(); activity.OnboardActivityID = onboardactivity.ID; activity.Type = onboardactivity.Type; activity.Title = onboardactivity.Name; return(activity); }
public ActionResult _CreateActivity(OnboardActivity activity) { if (ModelState.IsValid) { db.OnboardActivities.Add(activity); db.SaveChanges(); } return(View()); }
public ActionResult _CreateActivity() { var activity = new OnboardActivity(); return(View()); }