Exemple #1
0
 private void attach_Reis(Reis entity)
 {
     this.SendPropertyChanging();
     entity.BasicReis = this;
 }
Exemple #2
0
 private void detach_Reis(Reis entity)
 {
     this.SendPropertyChanging();
     entity.BasicReis = null;
 }
Exemple #3
0
 partial void UpdateReis(Reis instance);
Exemple #4
0
 partial void DeleteReis(Reis instance);
        public void TestReisAddGetUpdateDelete()
        {
            //Add-Get-Тест
            DateTime date = DateTime.Now;
            Reis expectedReis = new Reis();
            expectedReis.Date = date;

            DataAccessReis reis = new DataAccessReis();
            reis.AddElement(expectedReis);
            var actualReis = reis.GetAll().Last();
            Assert.AreEqual(expectedReis, actualReis);

            //Update - Тест
            expectedReis = actualReis;
            expectedReis.Date = date.AddDays(2);
            reis.UpdateElement(expectedReis);
            actualReis = reis.GetElement(expectedReis.CodeReis);
            Assert.AreEqual(expectedReis, actualReis);

            //Delete-Тест
            int expectedCount = reis.GetAll().Count() - 1;
            reis.DeleteElement(actualReis);
            int actualCount = reis.GetAll().Count();
            Assert.AreEqual(expectedCount, actualCount);
        }
Exemple #6
0
 partial void InsertReis(Reis instance);
		private void detach_Reis(Reis entity)
		{
			this.SendPropertyChanging();
			entity.BasicReis = null;
		}
		private void attach_Reis(Reis entity)
		{
			this.SendPropertyChanging();
			entity.BasicReis = this;
		}
 partial void DeleteReis(Reis instance);
 partial void UpdateReis(Reis instance);
 partial void InsertReis(Reis instance);