public BooksRepository() { try { ConnectionInfo = new EntityConnection(); BooksViewPoint = new ObservableCollection <BookInfo>(); using (var DbContext = ConnectionInfo.GetContext()) { var converter = new BookConverter(); foreach (var Book in DbContext.Books) { BooksViewPoint.Add(converter.ToInfo(Book)); } } } catch (Exception ex) { ExceptionLogger.Log(ex); } }