public IEnumerable<Stop> GetAll(Stop item) { lock (locker) { return _connection.Table<Stop>().OrderBy(x => x.Id).ToList(); } }
public int Delete(Stop item) { int result; lock (locker) { result = _connection.Delete(item); return result; } }
public Stop GetById(Stop item) { lock (locker) { return _connection.Table<Stop>().Where(x => x.Id == item.Id).FirstOrDefault(); } }
public int Save(Stop item) { int result; lock (locker) { if (!string.IsNullOrEmpty(item.Id)) { result = _connection.Update(item); } else { result = _connection.Insert(item); } return result; } }