vgquotes/Src/VideoGameQuotes.Api/Publisher.cs
tmont 14ca315213 * dto madness
* api madness
* browse page is beginning to not be empty
* NetVotes -> Score
2011-02-16 02:48:11 +00:00

32 lines
774 B
C#

using System;
using System.ComponentModel.DataAnnotations;
using Portoa.Persistence;
namespace VideoGameQuotes.Api {
public class Publisher : Entity<Publisher, int>, IDtoMappable<PublisherDto> {
public Publisher() {
Created = DateTime.UtcNow;
}
[Required]
public virtual string Name { get; set; }
public virtual string Website { get; set; }
public virtual DateTime Created { get; set; }
public virtual PublisherDto ToDto() {
return new PublisherDto {
Id = Id,
Name = Name,
Website = Website,
Created = Created
};
}
}
public class PublisherDto {
public int Id { get; set; }
public string Name { get; set; }
public string Website { get; set; }
public DateTime Created { get; set; }
}
}