PI06 i PI06-1. Docker definitions for MSSQL and Postgres. Data seeder/generator for countries and people. Entity Framework example with variants for Postgres and MSSQL
This commit is contained in:
26
SomeOfCSharpFeatures/Inheritance/Vehicle.cs
Normal file
26
SomeOfCSharpFeatures/Inheritance/Vehicle.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace Inheritance;
|
||||
|
||||
public class Vehicle
|
||||
{
|
||||
public string Model { get; private set; }
|
||||
public double HorsePower { get; set; }
|
||||
|
||||
public Vehicle(string model, double horsePower)
|
||||
{
|
||||
Console.WriteLine("Creating vehicle " + model);
|
||||
this.Model = model;
|
||||
this.HorsePower = horsePower;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
Console.WriteLine("Stop vehicle " + Model);
|
||||
}
|
||||
|
||||
public virtual void Start()
|
||||
{
|
||||
Console.WriteLine("Start vehicle " + Model);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user