Author: Code Maze

ASP.NET Core Web API with EF Core Code-First Approach

While working with the EF Core Code-First approach, we create the classes for our domain entities first. Later, we’ll create the database from our code by using migrations. This is the opposite of the Database-First approach where we design our database first and then create the classes which match our database design. In the EF Core Code-First approach, we have full control over the code and the database is just a store without any logic. This approach is helpful in situations where we are starting with the development of a new project and we don’t have a clear picture...

Read More

Enabling CORS in ASP.NET Core

In this post, we are going to talk about enabling CORS in ASP.NET Core Web Applications. You can find the source code for this blog post on GitHub. This post is divided into the following sections: About Same-Origin and What it Means What Is the Same-Origin policy? What Is CORS? How Does CORS Work? Inner Workings Preflight Requests Demo Same-Origin Policy in Action Enabling CORS Configuring CORS Requests Configure CORS Policy Options Before we understand how to enable CORS in ASP.NET Core applications, we need to understand an important concept in the web application security model called the Same-Origin...

Read More

Creating Vue.js Client Side – Two-way binding and v-model directive (Create and Update Components)

We are still missing the create and update components and in this article, we are going to implement these missing parts. With this post, we are going to finalize our application development process. For the complete series navigation visit: Vue.js Series. To download the source code for this part, visit Create and Update Owner Entity Source Code. This post is divided into several sections: Creating Owner Entity Editing Owner Entity Conclusion Creating Owner Entity We are going to create a form which has three input fields: name, date of birth and address. As soon as the user fills up...

Read More

Creating Vue.js Client Side – Using ref Keyword to Reference Components (Details and Delete Components)

In the previous part, we have learned how to create and listen to events. We have implemented functionality for all three buttons which emit custom events named details, update and delete and now we are going to implement functionalities for these events. For the complete series navigation visit: Vue.js Series. To download the source code for this part, visit Details and Deleting Owner Entity Source Code. This post is divided into several sections: Creating Owner Details Component Deleting the Owner Entity Conclusion Creating Owner Details Component In the previous part, we have created the custom details event and an...

Read More

Creating Vue.js Client Side – Components Props and Events

We have implemented everything that we have learned so far, from navigation and API services to data display. It’s time to dive deeper into more complicated things which we are going to make easy to understand. We are going to make an additional component and then show how communication between parent-child components works. For the complete series navigation visit: Vue.js Series. To download the source code for this part, visit Components Props and Events. This post is divided into several sections: Creating a New Component Event Handling Conclusion Creating a New Component Do you remember the OwnerList component from...

Read More