private void AddVoluntario()
        {
            IPersistenceApplication per = new CrossCutting.IoCManager.Voluntario.Application.Persistence.PersistenceApplicationIoCManager(base.Config).GetCurrentIPersistenceApplicationImplementation();

            per.Voluntario = Voluntario;
            per.RequestId  = RequestId;
            per.Add();
        }
Beispiel #2
0
        public void AddTest()
        {
            if (Voluntario == null)
            {
                Setup();
            }
            IPersistenceApplication per = new CrossCutting.IoCManager.Voluntario.Application.Persistence.PersistenceApplicationIoCManager(base.Config)
                                          .GetCurrentIPersistenceApplicationImplementation();

            //per.Voluntario = Voluntario;
            per.VoluntarioSerialized = base.GetVoluntarioSerialized();
            string test = base.GetVoluntarioSerialized();

            per.RequestId = RequestId;
            per.Add();
        }
Beispiel #3
0
 public IActionResult Post([FromBody] string voluntario, [FromServices] IConfiguration config)
 {
     using (IPersistenceApplication applicationPer
                = new CrossCutting.IoCManager.Voluntario.Application.Persistence.PersistenceApplicationIoCManager(config)
                  .GetCurrentIPersistenceApplicationImplementation())
     {
         string requestId = Guid.NewGuid().ToString();
         applicationPer.RequestId            = requestId;
         applicationPer.VoluntarioSerialized = voluntario;
         try
         {
             applicationPer.Add();
             return(Created("api/[controller]", applicationPer.Voluntario));
         }
         catch (Exception ex)
         {
             return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message));
         }
     }
 }