0
[email protected] created
I was hoping someone would be able to offer some assistance with having base classes in AspNetZero. AspNetZero Version: latest Tech Stack: Asp .Net Core w\ MVC & jQuery
I need to have a base class “Animal” which will contain properties that are relevant to ALL species of animals. An example would be that I have a “PIGS” entity which must inherit from “AnimalBase”.
I’m not too sure how to accomplish this in AspNetZero. I would greatly appreciate a “dumbed-down” response. I have a learning disability which doesn’t make things impossible just takes me longer to catch on.
Thanks
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
Hi,
You can do this as you can do it in a regular C# application. Here is a very simple example.
public class AnimalBase{ public int Age {get; set;} } public class Pigs : AnimalBase { // other properties... }I hope this helps.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)