/// <summary> /// Cria uma lista de ModelView com base em uma lista de Models /// </summary> /// <param name="modelList">The model list.</param> /// <returns></returns> public static IList <UsuarioModelView> BuildModelViewList(IList <Usuario> modelList) { IList <UsuarioModelView> modelViewList = new List <UsuarioModelView>(); foreach (var item in modelList) { modelViewList.Add(UsuarioFactory.BuildModelView(item)); } return(modelViewList); }
/// <summary> /// Cria uma lista usuário com base em uma lista de UsuárioModelView /// </summary> /// <param name="modelViewList">The model view list.</param> /// <returns></returns> public static IList <Usuario> BuildModelList(IList <UsuarioModelView> modelViewList) { IList <Usuario> usuarios = new List <Usuario>(); foreach (var item in modelViewList) { usuarios.Add(UsuarioFactory.BuildModel(item)); } return(usuarios); }