Skip to main content

Posts

Recent posts

Create your first Bot using Visual Studio 2017: Step by step guide

By looking at how fast the companies adopting the Bots, it is really the best time for you to start learning Bot framework and start adopting Bots for your business. Some pain in the real world without the Bots: You have to read the whole FAQ to find some specific information for any website or any company You have to wait for next business day to start to get answers to your queries You have to send emails to get some information to send some information You have to do manual work to answer some repetitive questions More manpower would require if the number of questions increases suddenly: This would eventually affect your business. Time to try the Bots. Build bots with the Bot Framework T he Bot Framework provides services, libraries, samples, and tools to help you build and debug bots. The Azure Bot Service is the best way to get started with building bots. With the Azure Bot Service, you can create and deploy a bot in just a few minutes. You c...

ASP.NET Core & Angular 2 - Chapter 3 Display the weather

Display the weather We’ll take a look at how to create a .NET Core Web API controller, retrieve data from it and pass that up to the Angular front end (where it will be rendered as a page on your site). Add Controller Method We’ll initially just add a simple method to the WeatherController to make use of the OpenWeather API to get forecast by City. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 [HttpGet("[action]/{city}")] public async Task WeatherForecast(string city) { using (var client = new HttpClient()) { try { client.BaseAddress = new Uri("http://api.openweathermap.org"); var response = await client.GetAsync($"/data/2.5/weather?q={city}&appid=[Insert API Key Here ]&units=metric"); response.EnsureSuccessStatusCode(); var result = await response.Content.ReadAsStringAsync(); ...

ASP.NET Core & Angular 2 - Chapter 2 Routing

Route to a component The Angular 2 router is a powerful tool which enables you to do just that. Specifically you can configure it to route to a component when the user enters a specific url for your site. So in this case, we could configure it so that navigating to http://domain/hello routes directly to the hello world component. Open up your app.module.ts file and make the following simple change in routing section. 1 2 3 4 5 6 7 8 9 10 11 imports: [      DefaultModules, //This automatically imports BrowserModule, HttpModule, and JsonpModule too.      RouterModule.forRoot([          { path: '' , redirectTo: 'home' , pathMatch: 'full' },          { path: 'home' , component: HomeComponent },          { path: 'counter' , component: CounterComponent },       ...