r/csharp 13h ago

What's the best way to develop your C# programming skills and prepare for the exam?

4 Upvotes

Hi all.

I'm currently studying to become a programmer and work mainly with C# and .NET. During my training, I have already encountered WinForms, LINQ, Web API, ASP.NET MVC, Entity Framework, SQL Server and CRUD operations.

I can do some projects based on the teacher's lessons, but I want to move beyond just repetition to actually understanding the code. I also use AI as a learning tool, but I don’t want to depend on it(at least I try do it alone), but I have an exam soon (At the end of October), so I want to not only pass it, but also better prepare myself for independent work.

Now I'm trying to figure out which way of learning will be more effective.

For example:

- Take a ready-made program or service, such as Steam, and figure out what parts its simplified version could consist of;

- Watch the lesson, and then close it and try to repeat the project yourself;

- Take a completed project and rewrite it from scratch without prompting;

- Specifically add new functions that were not included in the lesson;

Solve small problems separately on classes, collections, LINQ, CRUD and working with a database;

- Receive someone else's code with errors and try to fix it yourself;

- First, write the solution yourself, and only then compare it with the example.

I'm especially interested in how to properly use real-life applications as examples. I understand for myself that it is impossible to repeat Steam entirely for a beginner, but you can try to make a small training version: list of games, categories, search, user library, adding and deleting entries, authorization and saving data.

Would this approach be beneficial, or would it be better to focus on small, individual exercises first?

I would also like to understand what is more important to review before the C# exam. But right now I'm planning to check:

- Variables and data types;

- Conditions and cycles;

- Methods;

- Classes, objects, constructors and properties;

- Inheritance, interfaces and polymorphism;

- Lists and other collections;

- LINQ;

- exception handling;

- Working with files;

- async/await;

- CRUD;

- Entity Framework and database connection;

- Basics of ASP.NET MVC and Web API.

I would be grateful for your advice on the order of study. Particularly interesting is the opinion of people who have already gone through the stage when the code for the lesson is clear, but it is still difficult to write a similar solution completely independently.

I also have several teaching projects. What is more convenient to attach for analysis: a link to GitHub or a ZIP archive?

The main question is: what practical plan would you recommend for someone at my level to gradually move from repeating lessons to writing C# projects on their own?


r/csharp 5h ago

Showcase Streamlining .NET Data Layers with ByteAether.Ulid v1.4.0 (EF Core, LinqToDB, Dapper Support)

Thumbnail
github.com
1 Upvotes

A Universally Unique Lexicographically Sortable Identifier (ULID) is a 128-bit identifier designed to address database indexing issues inherent to random UUIDs/GUIDs. It pairs a 48-bit millisecond timestamp with 80 bits of randomness, encoded using Crockford's Base32 string format (26 characters).

Unlike standard GUIDs (e.g., UUIDv4), ULIDs preserve chronological ordering. This prevents B-tree index fragmentation and page splits during high-volume database writes, while retaining global uniqueness without central ID authority bottlenecks.

  • GUID Example: c8a411ec-29fa-4740-9a3b-185d26a2f7c0 (Random, non-sequential)
  • ULID Example: 01ARZ3NDEKTSV4RRFFQ69G5FAV (Timestamp prefix + random suffix, lexicographically sortable)

What's New in ByteAether.Ulid v1.4.0

While the core ByteAether.Ulid engine provides a zero-allocation, lock-free, spec-compliant implementation for .NET, mapping custom primitives to relational databases previously required custom value converters and endianness handling.

The v1.4.0 release shifts focus to first-class data access layer integration. It introduces dedicated companion packages for EF Core, LinqToDB, and Dapper to handle serialization, storage formatting, and endianness alignment out of the box:

Solving Storage Layouts & Database Engine Alignment

Database engines evaluate 128-bit storage types and byte alignments differently. The companion packages support four explicit UlidStorageFormat strategies to ensure efficient indexing across backends:

  • **UlidStorageFormat.Binary**: Persists raw 16-byte big-endian blocks for engines like PostgreSQL (bytea), MySQL (binary(16)), or SQLite.
  • **UlidStorageFormat.String**: Stores the 26-character Crockford Base32 representation (CHAR(26)) for maximum human readability and uniform cross-platform sorting at the cost of higher storage overhead.
  • **UlidStorageFormat.Guid**: Maps directly to standard native 128-bit GUID types (uuid) for systems that handle .NET Guid structures transparently.
  • **UlidStorageFormat.SqlServerGuid**: Reorders internal byte layouts specifically for Microsoft SQL Server uniqueidentifier. Because MSSQL prioritizes bytes 10–15 during index evaluation, shifting the 48-bit timestamp to the end prevents random writes and B-tree index fragmentation.

Fast Time-Range Index Queries

Because timestamp data is embedded directly into the primary key, range queries can target the primary index using boundary tokens:

```csharp Ulid minId = Ulid.MinAt(DateTimeOffset.UtcNow.AddDays(-7)); Ulid maxId = Ulid.MaxAt(DateTimeOffset.UtcNow);

// Translates to an optimized index scan: WHERE Id >= @minId AND Id <= @maxId var recentOrders = await context.Orders .Where(o => o.Id >= minId && o.Id <= maxId) .ToListAsync(); ```

Links & Resources

(The code for this project is entirely hand-written. AI was only used to brainstorm/draft text and generate raw media assets, which I then manually polished.)


r/csharp 12h ago

Deploying AI agent to buildserver?

0 Upvotes

In my company I'm in charge of building multiple AI agents:

- code review (only comments for now, eventually directly fixing small things like typos in naming)

- code gen (we have vertical slice architecture so simple repetitive things like enabling business directly setting master data from frontend requires like 45+ files / about 3-4h of dev work)

-pentesting agent

Our infra:

Dotnet backend deployed to multiple IIS depending on project.

Separate Build Server for automatically pulling master branch, building and deploying

Now that it's built and working locally the CTO wants to deploy it to our Build Server. Imo this is a Terrible idea, since prompt injection is possible. I would put it on a small isolated raspberry pi.

How would you set this up?