I use the command: csharp-ref http://localhost:5000 Address
Where I use Address.dtos.cs the project does not compile because of the wrong attribute.
Are we suppose to have the attribute in the generated dto’s ?
Generated Type
namespace SSRabbit.ServiceModel.Addresse.Types
{
public partial class Address : IAddress, IRowField { public virtual long Id { get; set; } [StringLength(MaximumLength=256)] public virtual string Line1 { get; set; } [StringLength(MaximumLength=256)] public virtual string Line2 { get; set; } [StringLength(MaximumLength=256)] public virtual string City { get; set; } [StringLength(MaximumLength=16)] public virtual string PostalCode { get; set; } [References(Type=typeof(SSRabbit.ServiceModel.Addresse.Types.Country))] public virtual long? CountryId { get; set; } public virtual Country Country { get; set; } [References(Type=typeof(SSRabbit.ServiceModel.Addresse.Types.Region))] public virtual long? RegionId { get; set; } public virtual Region Region { get; set; } public virtual bool IsActive { get; set; } public virtual double Longitude { get; set; } public virtual double Latitude { get; set; } public virtual DateTime CreatedDate { get; set; } public virtual DateTime UpdatedDate { get; set; } public virtual string CreatedBy { get; set; } public virtual string UpdatedBy { get; set; } public virtual ulong RowVersion { get; set; } }
Versus my original type:
[Alias("Adresses")] public class Address : IAddress, IRowField { [PrimaryKey, AutoIncrement] public long Id { get; set; } [StringLength(256)] public string Line1 { get; set; } [StringLength(256)] public string Line2 { get; set; } [StringLength(256)] public string City { get; set; } [StringLength(16)] public string PostalCode { get; set; } //zip [References(typeof(Country))] public long? CountryId { get; set; } [Reference] public Country Country { get; set; } [References(typeof(Region))] public long? RegionId { get; set; } [Reference] public Region Region { get; set; } public bool IsActive { get; set; } public double Longitude { get; set; } public double Latitude { get; set; } public DateTime CreatedDate { get; set; } public DateTime UpdatedDate { get; set; } public string CreatedBy { get; set; } public string UpdatedBy { get; set; } public ulong RowVersion { get; set; } public Address() { IsActive = true; CreatedDate = DateTime.UtcNow; UpdatedDate = DateTime.UtcNow; } }