Пример #1
0
 public void TestDefaults()
 {
     var plan = new PlanDto();
       Assert.That(plan.Executable, Is.Null);
       Assert.That(plan.Assembly, Is.Null);
       Assert.That(plan.Run, Is.Null);
       Assert.That(plan.ID, Is.Null);
 }
Пример #2
0
        public HttpResponseMessage PostPlan(PlanDto plandto)
        {
            var plan = mMapper.Map<Plan>(plandto);
              mRepo.Add(plan);
              plandto = mMapper.Map<PlanDto>(plan);

              var response = Request.CreateResponse(HttpStatusCode.Created, plandto);
              response.Headers.Location = new Uri(Url.Link("defaultapi", new {id = plandto.ID}));
              return response;
        }
Пример #3
0
 public void PutPlan(PlanDto plandto)
 {
     mRepo.Update(mMapper.Map<Plan>(plandto));
 }