mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
757 B
37 lines
757 B
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Volo.Abp.Domain.Values
|
|
{
|
|
public class Address : ValueObject
|
|
{
|
|
public Guid CityId { get; }
|
|
|
|
public string Street { get; }
|
|
|
|
public int Number { get; }
|
|
|
|
private Address()
|
|
{
|
|
}
|
|
|
|
public Address(
|
|
Guid cityId,
|
|
string street,
|
|
int number)
|
|
{
|
|
CityId = cityId;
|
|
Street = street;
|
|
Number = number;
|
|
}
|
|
|
|
//Requires to implement this method to return properties.
|
|
protected override IEnumerable<object> GetAtomicValues()
|
|
{
|
|
yield return Street;
|
|
yield return CityId;
|
|
yield return Number;
|
|
}
|
|
}
|
|
}
|