NServiceBus Cosmos Sample - Domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Post | |
{ | |
public Post(string postId, | |
string title, | |
string description, | |
string author) | |
{ | |
Id = postId; | |
PostId = postId; | |
Title = title; | |
Description = description; | |
Author = author; | |
LastUpdatedDate = DateTime.UtcNow; | |
CreatedDate = DateTime.UtcNow; | |
} | |
[JsonProperty("id")] public string Id { get; set; } | |
public string PostId { get; set; } | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public string Author { get; set; } | |
public DateTime LastUpdatedDate { get; set; } | |
public DateTime CreatedDate { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Comment | |
{ | |
public Comment(string postId, | |
string commentId, | |
string content, | |
string commentedBy) | |
{ | |
Id = commentId; | |
PostId = postId; | |
Content = content; | |
CommentedBy = commentedBy; | |
CreatedDate = DateTime.UtcNow; | |
} | |
[JsonProperty("id")] public string Id { get; set; } | |
public string PostId { get; set; } | |
public string Content { get; set; } | |
public string CommentedBy { get; set; } | |
public DateTime CreatedDate { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment