auto.bus_api/Server/Models/City.cs
cuqmbr 95028ed18b feat: many thing
- Database model
- Data transfer objects
- Country management controller
2022-10-10 20:34:09 +03:00

19 lines
450 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using SharedModels.DataTransferObjects;
namespace Server.Models;
public class City
{
[Key]
public int Id { get; set; }
public string Name { get; set; } = null!;
public virtual IList<Address>? Addresses { get; set; }
[ForeignKey("StateId")]
public int StateId { get; set; }
public State? State { get; set; }
}