Skip to content

Instantly share code, notes, and snippets.

@alastairs
Created May 16, 2017 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alastairs/70d9e7372b3052bc567508bc3a22c1b8 to your computer and use it in GitHub Desktop.
Save alastairs/70d9e7372b3052bc567508bc3a22c1b8 to your computer and use it in GitHub Desktop.
Example Data Model/DTO in ASP.NET MVC
namespace Mvc.Examples
{
public class CreateRecordRequest
{
[JsonProperty("employee_id")]
[Required, DisplayName("employee_id")]
public string EmployeeId { get; set; }
[JsonProperty("source_id")]
[Required, DisplayName("source_id")]
public string SourceId { get; set; }
[JsonProperty("folder_name")]
[Required, DisplayName("folder_name")]
public string FolderName { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment