yavsc/Yavsc/Model/Relationship/Location.cs

38 lines
797 B
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc
{
/// <summary>
/// Position.
/// </summary>
2016-07-27 10:55:44 +02:00
public class Position
2016-05-17 18:22:18 +02:00
{
/// <summary>
/// The longitude.
/// </summary>
[Required(),Display(Name="Longitude")]
[Range(-180, 360.0)]
public double Longitude { get; set; }
/// <summary>
///
/// The latitude.
/// </summary>
[Required(),Display(Name="Latitude")]
[Range(-90, 90 )]
public double Latitude { get; set; }
}
2016-07-27 10:55:44 +02:00
public class Location : Position {
2016-05-17 18:22:18 +02:00
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required(),
Display(Name="Address")]
public string Address { get; set; }
}
}