GithubHelp home page GithubHelp logo

markjprice / cs7dotnetcore2 Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 65.0 137.13 MB

Repository for the Packt Publishing book titled "C# 7.1 and .NET Core 2.0" by Mark J. Price

C# 75.36% CSS 0.87% JavaScript 3.44% Ruby 0.02% PowerShell 0.07% TypeScript 6.01% HTML 14.23%

cs7dotnetcore2's Introduction

Hi there 👋, I am Mark J. Price. Author. Programmer. Teacher.

  • 📖 You can get my books from Amazon or my publisher Packt or any good book store.
  • 🤔 I’m currently working on the .NET 8 editions of my best selling books, C# 12 and .NET 8 - Modern Cross-Platform Development Fundamentals, scheduled to publish on November 14, 2023, the 2nd edition of my book, Apps and Services with .NET 8, scheduled to publish on December 12, 2023, and Tools and Skills for .NET 8 Pros, coming in 2024.
  • 🌱 You can read a Q&A with me.
  • 💬 Ask me about any issues that you might be having with the code in my books.
  • 📫 How to reach me: markjprice is also my Gmail account name.
  • ⚡ Michelle McNamara: "It’s chaos. Be kind."
  • 🦣 I am on Mastodon.

What you should know about me

An ex-Microsoft Certified Trainer (MCT) with more than 30 years’ experience in the IT industry, including two years working full-time for Microsoft’s Training and Certification group in Redmond, USA, I specialize in training that leads to developer certifications.

I am eager to lead programming students, both experienced and new, into the challenging worlds of web, cloud, and mobile computing using a rare combination of thirty years’ education experience coupled with real world consulting and developing production systems for enterprises worldwide.

  • I live in Wiltshire, England.
  • I'm experienced in the practical use of Microsoft developer tools and technologies.
  • I'm dedicated to enthusiastic and dynamic training as a means of nurturing a lifelong love of programming.
  • I design, write, and deliver standardized and custom programming courses.
  • I'm adaptable and deal well with ambiguity in organizations of varying sizes and cultures.
  • I hold an Honours Bachelor’s Degree in Computer Science.

I have written a trilogy of guided learning books about C# and .NET:

See all my books on Amazon or Packt's website.

Education and Certification

Highly qualified and experienced.

Microsoft Certified Solutions Developer (MCSD)

Web Applications, Universal Windows Platform, Windows Store Apps Using C#, SharePoint Developer

Microsoft Specialist

Programming in C#, Programming in HTML5 with JavaScript & CSS3, Developing Microsoft Azure Solutions, Architecting Microsoft Azure Solutions

Microsoft Certified Trainer (MCT)

1993 - 2017

Computer Science (BSc. Hons.)

University of Bristol, June 1993

Professional Scrum Master I

Since January 2016

Google App Engine Qualified Developer

One of less than one hundred worldwide.

cs7dotnetcore2's People

Contributors

dependabot[bot] avatar markjprice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cs7dotnetcore2's Issues

Part3 : The customers list only shown once and disappeared

In the part 3:
The response of customers data only shown once and disappeared.
I saw the error message like the following:

No 'Access-Control-Allow-Origin' header is present on the requested resource.

I tested the snippet on the book

public void ConfigureServices(IServiceCollection services)
        {
services.AddCors();

..}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
  app.UseCors(c=>c.WithOrigins("Http://localhost:5002"));
  //          app.UseCors("AllowAllOrigins");
            app.UseMvc();
}

I cannot get the customers' data.help please, thanks!

Solutions to exercises

Hi Mark, you mentioned that readers can find all solutions to the exercises for this book in this repo, however, I looked through all the folders couldn't find them. Could you tell me where can I find the solutions?

GetStreamAsync().Result hangs UI thread.

Hi Mark,

I believe code in CategoriesViewModel that asks for service response is very bad example and shouldn't be shown as such. Generally we shouldn't await in UI thread. UI should be responsive.
From my perspective this example works only because HTTP response is from localhost, not remote server. Just add Thread.Sleep(5000) and see app hang for 5 seconds.

There are many articles on the internet treating this as potential UI deadlock situation, example:
https://medium.com/bynder-tech/c-why-you-should-use-configureawait-false-in-your-library-code-d7837dce3d7f
For me it was only long await time, not a deadlock but still.

I believe the right solution is to firstly create empty ObservableCollection. Then, create simple task (important it's worker, not UI thread) and run code that's in constructor. No awaits. When request is completed fill Categories collection (still in task) using CoreApplication.MainView.Dispatcher.RunAsync to access it via UI thread.
Since it is ObservableCollection once task is finished collection will be updated automatically.

Hope it helps,
Myfero

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.