Exemplo n.º 1
0
        public async Task <ActionResult> ConfigureTemplateDetail([FromBody] TemplateDetail model)
        {
            await Validate(model);

            AuthorizeAll();

            var result = await _svc.Configure(model);

            return(Ok());
        }
Exemplo n.º 2
0
        public void CanCreateAndEditTemplates()
        {
            using (TestSession test = CreateSession())
            {
                TemplateService mgr      = test.GetTemplateManager();
                TemplateDetail  template = mgr.Create(new TemplateDetail {
                    Name   = "JamOn",
                    Detail = "original"
                }).Result;

                Assert.True(template.Id > 0);

                template.Name  += "Changed";
                template.Detail = "detail";
                template        = mgr.Configure(template).Result;
                Assert.Matches("Changed", template.Name);
                Assert.Equal("detail", template.Detail);
            }
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Configure([FromBody] TemplateDetail template)
        {
            var result = await _templateService.Configure(template);

            return(Ok());
        }