private void ConfigureGrid() { using (var repo = new ExecutorRepo()) { // Build a LINQ query that gets back some data from the Inventory table. executorsInventory.ItemsSource = repo.GetAll().Select(x => new { x.Id, x.LastName, x.FirstName, x.Patronymic, x.TIN, x.PassportNumber, x.PassportIssuedBy, x }); } }
public MainWindow() { InitializeComponent(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); executorRepo = new ExecutorRepo(); directionsRepo = new DirectionsRepo(); serviceRepo = new ServiceRepo(); grantAgreementRepo = new GrantAgreementRepo(); historyRepo = new HistoryRepo(); stopWatch.Stop(); TimeSpan ts1 = stopWatch.Elapsed; string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts1.Hours, ts1.Minutes, ts1.Seconds, ts1.Milliseconds); Console.WriteLine(elapsedTime); SetCulture(); }