Ejemplo n.º 1
0
 public void CreateContainerMakesServiceStopped()
 {
     using (var container = _host.Create("kiasaki/alpine-postgres",
                                         new ContainerCreateParams
     {
         Environment = new[] { "POSTGRES_PASSWORD=mysecretpassword" }
     }))
     {
         Assert.AreEqual(ServiceRunningState.Stopped, container.State);
     }
 }
Ejemplo n.º 2
0
        public async Task <IActionResult> Post([FromBody] PostHostDto dto)
        {
            if (ModelState.IsValid == false)
            {
                return(BadRequest(ModelState));
            }

            var result = await _service.Create(dto.ToModel()).ConfigureAwait(false);

            return(CreatedAtAction("GetById", new { id = result.Id }, result));
        }