Posts

ASP.NET Web API with C# - Implementing GET method and accessing in C#,JQuery

Image
Hello.. !! We have seen how to create a ASP.NET Web API   project   and accessing it through localhost. Now we will implement CRUD(Create, Read,Update, Delete) operations for the project we have seen earlier Here is the project description "Build a  Web API  project for a  Super Market/ Mart  where there is a huge DB warehouse of  Products  which are belongs to different categories and with prices. These products are associated with  Sellers  data. This DB warehouse also contains all  Orders  data associated with  Customer  details" What we do in this article Adding a Model Implement GET operation Access it from C# and Javascript Download Web API solution Download Web API Sample Code Files First we need to create a  Web API  project. You can easily follow this link to know how to create it. After having all these set, we can move further Adding a Model Right Click on the Mo...

ASP.NET Web API with C# - Create first Project

Image
Hello..!! We went through lot of theory till now. So let's jump into bit coding by creating our first ASP.NET  Web API  using C# Contents in this article Requirements Create Web API project Basic Get operations Download Web API solution Requirements There are some requirements  to create Web API Visual Studio 2010 or latest .NET Framework 4.0 or more  Bit patience as well Create Web API project I am using Visual Studio Community Edition 2019    in this article as I am not that rich to use licensed versions of VS✌✌. If you are using another VS Edition, you may have some professional and rich look but navigation will be similar almost Let's open Visual Studio, in the home screen it will show up some existing projects. Click on  Create a New Project  or go through  Visual Studio -> File -> New -> Project/Solution Then you will be shown with a screen where you need to select the type of project we are ...

Authorization and Authentication

Image
Hello..!!! Lot of times we see  warning message saying " You are not Authorized to use this " or " Authenticate yourself to download this file " These two words may confuse us bit because they are too similar to write and pronounce. All the services or APIs will go under Authorization and Authentication steps in order to give access to the resources.Let's dig deep into it. So, will discuss below in this article What is Authentication and Why  What is Authorization An Example to differentiate them What is Authentication Yes..!! Authentication is a process of verifying who you are. Generally if we visit any e commerce site or social network site, we will be prompted to Sign In/Login with a UserID/Username and Password. Sometimes it could ask for mobile number to verify you through OTP  If you are failed in Authentication process you are not even allowed to see the home page in some web applications(so sad). This process comes under sec...

What is RESTful ASP.Net Web API ?

Hello Again...!!! I am back with another interesting topic called "Web API" So, in article will get a clear picture of the following  What is Web Site and Web Service What is RESTful service What is API and  Web API What is ASP.Net Web API Web Site vs Web Service Today's world is living online. We start our day by taking a selfie and posting it in a social media site . We express our opinions online about the issues/events happening around us.We shop online. We make people happy/irritate online. We make friends/breakup💔  online.We can do Pooja/Archana(not girl's name 👆 ) for God  online. Even marriage events are also happening online these days👬👬 Every time I say online either it references a Web Site or Web Service. It can be a mobile app which consumes Web Service Basically, a Web Site   is collection of  web pages( GUI ) which can be rendered on the browser with the controls( Button, Text box, Date Picker ). In whichever language w...

Dependency Injection in C Sharp(C#)

Hello..!! Welcome back to The Midnight Coder.. Today we will discuss about an interesting topic called "Dependency Injection" . So, Dependency Injection is a powerful Injection which kills the insects,bacteria and virus(Corona) in our stomach..😼😼😼 Just kidding Will go step by step. For simplicity and to save some energy I will call  it as DI What is DI Why DI Sample Problem and Code DI Types and Usage Download C# code samples here This topic makes bit confusion. So, Before continuing further I need some Deals/Promises to be clear. So that you can understand the concept of DI easily. Yes, but I can do this in a different way Is this the only way ? I won't do that So, Don't ask these yourself in middle of this article to avoid confusion. Just go with the flow, implement it. You will definitely find the difference What is DI There are few definitions for  DI. I've tried to make it simple below " DI is a process of removi...