public Location Create(Location location) { if (location.Id == Guid.Empty) { location.Id = Guid.NewGuid(); } using (var connection = context.CreateConnection()) { connection.Execute(LocationQuery.Insert(location)); return(location); } }
public async Task <Location> CreateAsync(Location location) { if (location.Id == Guid.Empty) { location.Id = Guid.NewGuid(); } using (var connection = context.CreateConnection()) { await connection.ExecuteAsync(LocationQuery.Insert(location)); return(location); } }
public void InsertList([FromBody] List <Location> data) { var query = new LocationQuery(); query.Insert(data); }