filmov
tv
Class 3 - Concepts: Class Library, Add Reference, List and For loop

Показать описание
Visual Studio Code - Run and Debug
Run and Debug demo
What is a Class Library?
A class library file is a collection of classes and namespaces in C# without any entry point method like Main.
Create a data project and add the same to the solution.
dotnet new classlib -n DataMover.Data --language c#
Create a model project and add the same to the solution.
dotnet new classlib -n DataMover.Model --language c#
Create a business project and add the same to the solution.
dotnet new classlib -n DataMover.Services --language c#
What is a project reference ?
Add model project as a reference in data project. Run this command on the data project.
Add the data project as a reference in the business project. Run this command on the Services project.
Add the data project as a reference in the batch project. Run this command on the batch project.
Add the Services project as a reference in the batch project. Run this command on the batch project.
What is a List ?
List in C# is a collection of strongly typed objects
What is a model class ?
Model represents class or data structure that represents an application’s data as public properties and business logic as methods.
Run and Debug demo
What is a Class Library?
A class library file is a collection of classes and namespaces in C# without any entry point method like Main.
Create a data project and add the same to the solution.
dotnet new classlib -n DataMover.Data --language c#
Create a model project and add the same to the solution.
dotnet new classlib -n DataMover.Model --language c#
Create a business project and add the same to the solution.
dotnet new classlib -n DataMover.Services --language c#
What is a project reference ?
Add model project as a reference in data project. Run this command on the data project.
Add the data project as a reference in the business project. Run this command on the Services project.
Add the data project as a reference in the batch project. Run this command on the batch project.
Add the Services project as a reference in the batch project. Run this command on the batch project.
What is a List ?
List in C# is a collection of strongly typed objects
What is a model class ?
Model represents class or data structure that represents an application’s data as public properties and business logic as methods.