Skip to content

kabiliolabs/sql-server-candidates-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Server Sync Agent — Candidates Challenge

Read CHALLENGE_DESCRIPTION.md for the full challenge explanation and what we're looking for.


Prerequisites


Database Setup — AdventureWorks OLTP

You need to install the AdventureWorks OLTP sample database. Follow these steps:

1. Download the backup file

Download AdventureWorks2025.bak from Microsoft's GitHub releases:

https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorks2025.bak

For more details see: https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure

2. Move the backup file

Copy the .bak file to your SQL Server backup directory. The default location is:

C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup

The path varies depending on your SQL Server version and instance name.

3. Restore the database

Option A: Using SSMS

  1. Open SSMS and connect to your SQL Server instance
  2. Right-click DatabasesRestore Database...
  3. Select Device, click ..., then Add
  4. Browse to the .bak file and select it
  5. Click OK to restore

Option B: Using T-SQL

USE [master];
GO
RESTORE DATABASE [AdventureWorks2025]
FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\AdventureWorks2025.bak'
WITH FILE = 1, NOUNLOAD, STATS = 5;
GO

Adjust the path to match your environment.

4. Verify

Run a quick query to confirm the database is working:

USE [AdventureWorks2025];
SELECT COUNT(*) FROM Sales.Customer;

Running the Test Platform

The SyncPlatform app simulates the central platform API that your sync agent will communicate with.

Build and run

cd src/SyncPlatform
dotnet build
dotnet run --project SyncPlatform

The WPF app will open with:

  • Server running on http://localhost:5100
  • Buttons to enqueue sync tasks (Customers, Products, Orders, Inventory)
  • Log viewer showing all HTTP requests and responses

API details

Quick test with curl

# Should return 204 (no tasks queued)
curl -H "X-Api-Key: candidate-test-key-2026" http://localhost:5100/api/sync/next-task

# Click a button in the app, then try again — should return 200 with a task

Your Task

Build your solution in the candidate/ directory. See CHALLENGE_DESCRIPTION.md for full details.


How to Submit Your Solution

  1. Fork this repository to your own GitHub account
  2. Push your changes to your fork
  3. Open a Pull Request back to this repository

Do not try to push directly to this repo — you won't have write access and it will fail.

Make sure to:

If you're unsure how to open a PR from a fork, refer to this GitHub guide: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

About

Coding challenge for candidates: Build a .NET sync agent that polls a central platform API for tasks, queries an on-premise AdventureWorks SQL Server database, and posts results back. Includes a WPF test app simulating the platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages