public object Get(DocumentCreate request) { return new HttpResult(request) { View = "Create" }; }
public object Post(DocumentCreate request) { var document = new Document() { Title = "New " + Convert.ToString(request.DocumentType), DocumentType = request.DocumentType, Created = DateTime.Now, Updated = DateTime.Now }; Db.Save(document); return new HttpResult(document) { Location = "/documents/" + document.Id }; }