Ejemplo n.º 1
0
        public AddNewVerificador(int?IdVerificador)
        {
            InitializeComponent();

            BindingContext      = verifContext;
            btnGuardar.Clicked += BtnGuardar_Clicked;
            var conn = new SQLiteConnection(path);

            verifContext = conn.Find <Verificador>(IdVerificador);
            Nombre.SetBinding(Entry.TextProperty, verifContext.Nombre);
            NoId.SetBinding(Entry.TextProperty, verifContext.NoId);
            IdVerificadorEntry.SetBinding(Entry.TextProperty, verifContext.IdVerificador.ToString());
        }
Ejemplo n.º 2
0
 public void TestCreateEntity()
 {
     using (var context = GetContext())
     {
         var newEntity = new NoId {Name = "TestCreate"};
         context.NoIds.Add(newEntity);
         context.SaveChanges();
     }
     using (var context = GetContext())
     {
         var existingEntity = context.NoIds.FirstOrDefault(x => x.Name.Equals("TestCreate"));
         Assert.That(existingEntity, Is.Not.Null);
     }
 }
Ejemplo n.º 3
0
 public void TestCreateEntity()
 {
     using (var context = GetContext())
     {
         var newEntity = new NoId {
             Name = "TestCreate"
         };
         context.NoIds.Add(newEntity);
         context.SaveChanges();
     }
     using (var context = GetContext())
     {
         var existingEntity = context.NoIds.FirstOrDefault(x => x.Name.Equals("TestCreate"));
         Assert.That(existingEntity, Is.Not.Null);
     }
 }
Ejemplo n.º 4
0
 public void TestPopulateEntityProperty()
 {
     using (var context = GetContext())
     {
         var fred = new Person{Name = "Fred"};
         var newEntity = new NoId {Name = "TestPopulateEntityProperty", Owner = fred};
         context.NoIds.Add(newEntity);
         context.Persons.Add(fred);
         context.SaveChanges();
     }
     using (var context = GetContext())
     {
         var existingEntity = context.NoIds.FirstOrDefault(x => x.Name.Equals("TestPopulateEntityProperty"));
         Assert.That(existingEntity, Is.Not.Null);
         Assert.That(existingEntity.Owner, Is.Not.Null);
         Assert.That(existingEntity.Owner.Name, Is.EqualTo("Fred"));
     }
 }
Ejemplo n.º 5
0
 public void TestPopulateEntityProperty()
 {
     using (var context = GetContext())
     {
         var fred = new Person {
             Name = "Fred"
         };
         var newEntity = new NoId {
             Name = "TestPopulateEntityProperty", Owner = fred
         };
         context.NoIds.Add(newEntity);
         context.Persons.Add(fred);
         context.SaveChanges();
     }
     using (var context = GetContext())
     {
         var existingEntity = context.NoIds.FirstOrDefault(x => x.Name.Equals("TestPopulateEntityProperty"));
         Assert.That(existingEntity, Is.Not.Null);
         Assert.That(existingEntity.Owner, Is.Not.Null);
         Assert.That(existingEntity.Owner.Name, Is.EqualTo("Fred"));
     }
 }
 public static void Broken(
     [MobileTable] NoId item)
 {
 }