public async Task Incluir(DroneEntity drone) { var model = drone.ConvertTo <Drone>(); _connection.CreateTableIfNotExists <Drone>(); await _connection.InsertAsync(model); }
public async Task Atualizar(DroneEntity drone) { var model = drone.ConvertTo <Drone>(); _connection.CreateTableIfNotExists <Drone>(); await _connection.UpdateAsync(model); }
public async Task Incluir(DroneEntity drone) { var model = drone.ConvertTo <Drone>(); using var conexao = await _dbFactory.OpenAsync(); conexao.CreateTableIfNotExists <Drone>(); await conexao.InsertAsync(model); }