Created
February 21, 2019 22:05
-
-
Save avegaraju/9c71b7d3b946211332bc51220b67737b to your computer and use it in GitHub Desktop.
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 OrdersResponseCreator : IResponseCreator | |
{ | |
public Response CreateResponse() | |
{ | |
var orderCreatedResponse = new OrderCreatedResponse | |
{ | |
Message = "Order created.", | |
OrderId = (uint)new Random().Next(int.MaxValue) | |
}; | |
return new ResponseBuilder().WithContent(orderCreatedResponse, new JsonContentSerializer()) | |
.WithStatusCode(HttpStatusCode.Created) | |
.Build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment