public static List <DocumentFile> ConvertToDocumentFileList(this IEnumerable <DocumentFileViewModel> documentFileViewModels) { List <DocumentFile> documentFiles = new List <DocumentFile>(); foreach (DocumentFileViewModel DocumentFile in documentFileViewModels) { documentFiles.Add(DocumentFile.ConvertToDocumentFile()); } return(documentFiles); }