public static UserFormSubmit MapUserFormSubmit(SW.Forms.DAL.Form form, bool deepLoad = false) { UserFormSubmit model = new UserFormSubmit() { FormId = form.Id, FormName = form.Name, FirstName = form.Account.FirstName, LastName = form.Account.LastName, UserImage = form.Account.Image }; if (deepLoad) { foreach (var item in form.FormSubmitValues) { model.FormSubmits.Add(new FormSubmitValuesModel() { Id = item.Id, Name = item.FormFields.Label, Value = item.Value }); } } return(model); }