public AddEntityViewModel(Guid id, IEntityService service)
 {
     _id = id;
     _service = service;
     _item = _service.GetThings().Single(x => x.Id == id);
     Name = _item.Name;
     Description = _item.Description;
     IsActive = _item.IsActive;
     EditCommand = new Command(Edit);
     DeleteCommand = new Command(Delete);
 }
Exemplo n.º 2
0
 public EntityViewModel(SomeEntity entity)
 {
     _entity = entity;
 }
Exemplo n.º 3
0
 public void Update(SomeEntity item)
 {
     _connection.Delete(item);
     _connection.UpdateAll(_connection.Table<SomeEntity>());
     _connection.Insert(item);
 }
Exemplo n.º 4
0
 public void Add(SomeEntity item)
 {
     _connection.Insert(item);
 }