public int Add(WriteLocation prod) { using (IDbConnection dbConnection = Connection) { return(dbConnection.Execute(LocationQueries.InsertUserCoordinates, prod)); } }
public bool Add(WriteLocation prod) { var location = _locationRepository.GetByUserId(prod.UserId); if (location != null) { var result = _locationRepository.Update(new UpdateLocation { Lat = prod.Lat, Lng = prod.Lng }, prod.UserId); return(result != 0); } else { var result = _locationRepository.Add(prod); return(result != 0); } }
public bool Post([FromBody] WriteLocation location) { return(_locationService.Add(location)); }
/// <summary> /// Initialize the event. /// </summary> /// <param name="loc">Where ensemble was written.</param> /// <param name="count">Either file size or number of ensembles.</param> public EnsembleWriteEvent(WriteLocation loc, long count) { Loc = loc; Count = count; }