Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using SQLite;
- namespace OrganizeSe
- {
- public class PickerMVVMViewModel
- {
- public List<listIng> listarIng { get; set; }
- public PickerMVVMViewModel()
- {
- listarIng = GetIngs().OrderBy(t => t.Value).ToList();
- }
- public List<listIng> GetIngs()
- {
- var ing = new List<listIng>()
- { // essa parte supostamente receberia os dados da tabela, mas fiz esses itens para checar o funcionamento.
- new listIng(){Key = 1, Value= "Pão"},
- new listIng(){Key = 1, Value= "Carne"},
- new listIng(){Key = 1, Value= "Ovo"},
- new listIng(){Key = 1, Value= "Presunto"},
- new listIng(){Key = 1, Value= "Queijo"},
- new listIng(){Key = 1, Value= "Bacon"}
- };
- return ing;
- }
- }
- public class listIng
- {
- public int Key { get; set; }
- public string Value { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment