Exemple #1
0
        public void Should_JSON_Drivers()
        {
            Models.Drivers model = new Models.Drivers()
            {
                BirthDate     = "1985-02-08",
                FamilyName    = "Lee",
                GivenName     = "Mary",
                LicenceNumber = "94977000",
                StateOfIssue  = "ACT",
                CountryCode   = "AUS"
            };

            var actual = model.ToClaim();

            //Assert.Equal(actual.Value, "a9dc32cc4b5416158dabefae23c8c6bd000841755a58e4c29e920af2705df604");

            Assert.NotEmpty(actual.Value);
        }
Exemple #2
0
        //Все в том числе неактивные
        public List <Models.Drivers> GetDriversAll()
        {
            Driver.Clear();
            try
            {
                using (DB.RegistrantCoreContext ef = new DB.RegistrantCoreContext())
                {
                    var temp = ef.Drivers.OrderByDescending(x => x.IdDriver);

                    foreach (var item in temp)
                    {
                        Models.Drivers driver = new Models.Drivers(item);
                        Driver.Add(driver);
                    }
                }
            }
            catch (Exception ex)
            {
                ((MainWindow)System.Windows.Application.Current.MainWindow).ContentErrorText.ShowAsync();
                ((MainWindow)System.Windows.Application.Current.MainWindow).text_debuger.Text = ex.ToString();
            }
            return(Driver);
        }