Example #1
0
 public ObjectResult Create([FromBody] Geolocalizar geolocalizar)
 {
     try
     {
         var geo = _service.Create(geolocalizar);
         return(StatusCode(202, new { id = geo.Id.ToString() }));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.ToString()));
     }
 }
Example #2
0
 public Geolocalizar Create(Geolocalizar geolocalizar)
 {
     _geolocalizar.InsertOne(geolocalizar);
     return(geolocalizar);
 }