Exemple #1
0
 public async Task <HttpResponseMessage> Create([FromBody] HiLo hilo)
 {
     if (hilo == null)
     {
         return(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
     else
     {
         using (var dbFactory = new DbContextFactory(this._env.EnvironmentName))
             using (var allocatorMng = new AllocatorManager(dbFactory))
             {
                 bool isKeyExist = false;
                 allocatorMng.CreateHiLoInstance(hilo, out isKeyExist);
             }
         // this.CreateHiLo(hilo);
         return(new HttpResponseMessage(HttpStatusCode.Created));
     }
 }