sépare le modèle client du serveur, et crée par la même la librairie Yavsc.Api
This commit is contained in:
38
Yavsc.Api/Model/Relationship/Location.cs
Normal file
38
Yavsc.Api/Model/Relationship/Location.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Position.
|
||||
/// </summary>
|
||||
public class Position
|
||||
{
|
||||
/// <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; }
|
||||
|
||||
}
|
||||
|
||||
public class Location : Position {
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required(),
|
||||
Display(Name="Address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user