Production-ready Domain-Driven Design patterns and data persistence implementations for .NET projects using Claude Code. Ideal for developers working on complex applications requiring scalable and maintainable architectures.
git clone https://github.com/nesbo/dotnet-claude-code-skills.gitProduction-ready Domain-Driven Design patterns and data persistence implementations for .NET projects using Claude Code. Ideal for developers working on complex applications requiring scalable and maintainable architectures.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/nesbo/dotnet-claude-code-skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a production-ready Domain-Driven Design (DDD) implementation for a [COMPANY] in the [INDUSTRY] sector. The system should include [DATA] persistence using Entity Framework Core. Provide the code for the domain layer, infrastructure layer, and application layer. Ensure the solution follows SOLID principles and is scalable for future enhancements.
# Domain-Driven Design Implementation for Retail Inventory Management System
## Domain Layer
```csharp
public class Product : IAggregateRoot
{
public Guid Id { get; private set; }
public string Name { get; private set; }
public decimal Price { get; private set; }
public int StockQuantity { get; private set; }
public Product(Guid id, string name, decimal price, int stockQuantity)
{
Id = id;
Name = name;
Price = price;
StockQuantity = stockQuantity;
}
public void UpdateStock(int quantityChange)
{
if (StockQuantity + quantityChange < 0)
{
throw new InvalidOperationException("Insufficient stock");
}
StockQuantity += quantityChange;
}
}
```
## Infrastructure Layer
```csharp
public class ProductRepository : IProductRepository
{
private readonly AppDbContext _context;
public ProductRepository(AppDbContext context)
{
_context = context;
}
public async Task<Product> GetByIdAsync(Guid id)
{
return await _context.Products.FindAsync(id);
}
public async Task AddAsync(Product product)
{
await _context.Products.AddAsync(product);
await _context.SaveChangesAsync();
}
// Additional repository methods...
}
```
## Application Layer
```csharp
public class ProductService : IProductService
{
private readonly IProductRepository _productRepository;
public ProductService(IProductRepository productRepository)
{
_productRepository = productRepository;
}
public async Task<Guid> CreateProductAsync(string name, decimal price, int stockQuantity)
{
var product = new Product(Guid.NewGuid(), name, price, stockQuantity);
await _productRepository.AddAsync(product);
return product.Id;
}
public async Task UpdateProductStockAsync(Guid productId, int quantityChange)
{
var product = await _productRepository.GetByIdAsync(productId);
product.UpdateStock(quantityChange);
// Save changes through repository
}
// Additional service methods...
}
```AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
Service Management That Turns Chaos Into Control
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power