/// <summary> /// To the model. /// </summary> /// <param name="model">The model.</param> /// <returns></returns> public static AssessmentSectionsModel ToModel(this AssessmentSectionsViewModel model) { if (model == null) { return(null); } var entity = new AssessmentSectionsModel { AssessmentSectionID = model.AssessmentSectionID, SectionName = model.SectionName, AssessmentID = model.AssessmentID, SortOrder = model.SortOrder, IsActive = model.IsActive, ModifiedBy = model.ModifiedBy, ModifiedOn = model.ModifiedOn, ForceRollback = model.ForceRollback }; return(entity); }
/// <summary> /// To the view model. /// </summary> /// <param name="entity">The entity.</param> /// <returns></returns> public static AssessmentSectionsViewModel ToViewModel(this AssessmentSectionsModel entity) { if (entity == null) { return(null); } var model = new AssessmentSectionsViewModel { AssessmentSectionID = entity.AssessmentSectionID, SectionName = entity.SectionName, AssessmentID = entity.AssessmentID, SortOrder = entity.SortOrder, PermissionKey = entity.PermissionKey, IsActive = entity.IsActive, ModifiedBy = entity.ModifiedBy, ModifiedOn = entity.ModifiedOn, ForceRollback = entity.ForceRollback }; return(model); }