Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sunriax/model

Repository files navigation

Version: 1.0 Release Version codecov License: GPL v3

Data models

Description

Simple data models that are often used in development and teaching.

PersonLib


Manual installation

Download library [zip | tar.gz] and unpack it to your project. Setup a reference and start using it in your project.

NuGet installation

NuGet

PM> Install-Package RaGae.Model.Person

Using Person

Person p = new();
Person p = new("Max", "Mustermann");
Person p = new()
{
 FirstName = "Max",
 LastName = "Mustermann"
};
p.FirstName; // Max
p.LastName; // Mustermann
p.ToString(); // Max Mustermann
Person c = (Person)p.Clone();

AddressLib


Manual installation

Download library [zip | tar.gz] and unpack it to your project. Setup a reference and start using it in your project.

NuGet installation

NuGet

PM> Install-Package RaGae.Model.Address

Using Address

Address a = new();
Address a = new("Musterstrasse", "1")
{
 City = new(1100, "Wien"),
 Country = new("AT", "Austria") 
};
Address a = new()
{
 Street = "Musterstrasse",
 Number = "1",
 City = new()
 {
 Zip = 1100,
 Name = "Wien"
 },
 Country = new()
 {
 Code = "AT",
 Name = "Austria"
 }
};
a.Street; // Musterstrasse
a.Number; // 1
a.ToString(); // Musterstrasse 1
a.City.Zip // 1100
a.City.Name // Wien
a.City.ToString(); // 1100 Wien
a.Country.Code // AT
a.Country.Name // Austria
a.Country.ToString(); // AT-Wien
Address c = (Address)a.Clone();

Using City

City c = new();
City c = new(1100, "Wien");
City c = new()
{
 Zip = 1100,
 Name = "Wien"
};
c.Zip; // 1100
c.Name; // Wien
c.ToString(); // 1100 Wien
City y = (City)c.Clone();

Using Country

Country c = new();
Country c = new("AT", "Austria");
Country c = new()
{
 Code = "AT",
 Name = "Austria"
};
c.Code; // AT
c.Name; // Austria
c.ToString(); // AT-Austria
Country y = (Country)c.Clone();

R. GÄCHTER

About

Libraries which contains data model templates

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /