public virtual IActionResult Add() { TAddModel addModel = Dal.GetAddModel(); Type type = addModel.GetType(); foreach (KeyValuePair <string, StringValues> keyValuePair in this.HttpContext.Request.Query) { PropertyInfo property = type.GetProperty(keyValuePair.Key); if (!Equals(property, null)) { property.SetValue(addModel, ControllerExtensions.Parse(keyValuePair.Value, property.PropertyType), null); } } return(base.View("AddOrEdit", addModel)); }