# Conflicts: # npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.ts # templates/app-nolayers/angular/package.json # templates/app/angular/package.json # templates/module/angular/package.jsonpull/23416/head
@ -0,0 +1,29 @@ |
|||
# IMPROVE YOUR ABP SKILLS WITH 33% OFF LIVE TRAININGS! |
|||
|
|||
We have exciting news to share\! As you know, we offer live training packages to help you improve your skills and knowledge of ABP. From September 8th to 19th, we are giving you 33% OFF our live trainings, so you can learn more about the product at a discounted price\! |
|||
|
|||
#### Why Join ABP.IO Training? |
|||
|
|||
ABP training programs are designed to help developers, architects, and teams master the ABP Framework efficiently. Whether you're new to the framework or looking to deepen your knowledge, our courses cover everything you need to build robust and scalable applications with ABP. |
|||
|
|||
#### What You’ll Gain: |
|||
|
|||
✔ Comprehensive live training from ABP Experts |
|||
✔ Hands-on learning with real-world applications |
|||
✔ Best practices for building modern web applications |
|||
✔ Certification to showcase your expertise |
|||
|
|||
#### [Limited-Time 33% Discount – Don’t Miss Out\!](https://abp.io/trainings?utm_source=referral&utm_medium=website&utm_campaign=training_abpblogpost) |
|||
|
|||
For a short period, all training packages are available at a 33% discount. This is a great opportunity to upskill yourself or train your team at a significantly reduced cost. |
|||
|
|||
#### How to Get the Discount? |
|||
|
|||
Simply visit our training page, select your preferred package, add your note if needed and send your training request, that's all\! ABP Training Team will reply to your request via email soon. |
|||
|
|||
#### Take Advantage of This Offer Today |
|||
|
|||
Invest in your skills and advance your career with ABP.IO training. This offer won’t last long, so grab your spot now\! |
|||
|
|||
### 🔗[Pick your package and send your training request now!](https://abp.io/trainings?utm_source=referral&utm_medium=website&utm_campaign=training_abpblogpost) |
|||
|
|||
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 310 KiB |
@ -0,0 +1,335 @@ |
|||
# Keep Track of Your Users in an ASP.NET Core Application |
|||
|
|||
Tracking what users do in your app matters for security, debugging, and business insights. Doing it by hand usually means lots of boilerplate: managing request context, logging operations, tracking entity changes, and more. It adds complexity and makes mistakes more likely. |
|||
|
|||
## Why Applications Need Audit Logs |
|||
|
|||
Audit logs are time-ordered records that show what happened in your app. |
|||
|
|||
A good audit log should capture details for every web request, including: |
|||
|
|||
### 1. Request and Response Details |
|||
- Basic info like **URL, HTTP method, browser**, and **HTTP status code** |
|||
- Network info like **client IP address** and **user agent** |
|||
- **Request parameters** and **response content** when needed |
|||
|
|||
### 2. Operations Performed |
|||
- **Controller actions** and **application service method calls** with parameters |
|||
- **Execution time** and **duration** for performance tracking |
|||
- **Call chains** and **dependencies** where helpful |
|||
|
|||
### 3. Entity Changes |
|||
- **Entity changes** that happen during requests |
|||
- **Property-level changes**, with old and new values |
|||
- **Change types** (create, update, delete) and timestamps |
|||
|
|||
### 4. Exception Information |
|||
- **Errors and exceptions** during request execution |
|||
- **Exception stack traces** and **error context** |
|||
- Clear records of failed operations |
|||
|
|||
### 5. Request Duration |
|||
- Key metrics for **measuring performance** |
|||
- **Finding bottlenecks** and optimization opportunities |
|||
- Useful data for **monitoring system health** |
|||
|
|||
## The Challenge with Doing It by Hand |
|||
|
|||
In ASP.NET Core, developers often use middleware or MVC filters for tracking. Here’s what that looks like and the common problems you’ll hit. |
|||
|
|||
### Using Middleware |
|||
|
|||
Middleware are components in the ASP.NET Core pipeline that run during request processing. |
|||
|
|||
Manual tracking typically requires: |
|||
- Writing custom middleware to intercept HTTP requests |
|||
- Extracting user info (user ID, username, IP address, and so on) |
|||
- Recording request start time and execution duration |
|||
- Handling both success and failure cases |
|||
- Saving audit data to logs or a database |
|||
|
|||
### Tracking Inside Business Methods |
|||
|
|||
In your business code, you also need to: |
|||
- Log the start and end of important operations |
|||
- Capture errors and related context |
|||
- Link business operations to the request-level audit data |
|||
- Make sure you track all critical actions |
|||
|
|||
### Problems with Manual Tracking |
|||
|
|||
Manual tracking has some big downsides: |
|||
|
|||
**Code duplication and maintenance pain**: Each controller ends up repeating similar tracking logic. Changing the rules means touching many places, and it’s easy to miss some. |
|||
|
|||
**Consistency and reliability issues**: Different people implement tracking differently. Exception paths are easy to forget. It’s hard to ensure complete coverage. |
|||
|
|||
**Performance and scalability concerns**: Homegrown tracking can slow the app if not designed well. Tuning and extending it takes effort. |
|||
|
|||
**Entity change tracking is especially hard**. It often requires: |
|||
- Recording original values before updates |
|||
- Comparing old and new values for each property |
|||
- Handling complex types, collections, and navigation properties |
|||
- Designing and saving change records |
|||
- Capturing data even when exceptions happen |
|||
|
|||
This usually leads to: |
|||
- **A lot of code** in every update method |
|||
- **Easy-to-miss edge cases** and subtle bugs |
|||
- **High maintenance** when entity models change |
|||
- **Extra queries and comparisons** that can hurt performance |
|||
- **Incomplete coverage** for complex scenarios |
|||
|
|||
## ABP Framework’s Built-in Solution |
|||
|
|||
ABP Framework includes a built-in audit logging system. It solves the problems above and adds useful features on top. |
|||
|
|||
### Simple Setup vs. Manual Tracking |
|||
|
|||
Instead of writing lots of code, you configure it once: |
|||
|
|||
```csharp |
|||
// Configure audit log options in the module's ConfigureServices method |
|||
Configure<AbpAuditingOptions>(options => |
|||
{ |
|||
options.IsEnabled = true; // Enable audit log system (default value) |
|||
options.IsEnabledForAnonymousUsers = true; // Track anonymous users (default value) |
|||
options.IsEnabledForGetRequests = false; // Skip GET requests (default value) |
|||
options.AlwaysLogOnException = true; // Always log on errors (default value) |
|||
options.HideErrors = true; // Hide audit log errors (default value) |
|||
options.EntityHistorySelectors.AddAllEntities(); // Track all entity changes |
|||
}); |
|||
``` |
|||
|
|||
```csharp |
|||
// Add middleware in the module's OnApplicationInitialization method |
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
|
|||
// Add audit log middleware - one line of code solves all problems! |
|||
app.UseAuditing(); |
|||
} |
|||
``` |
|||
|
|||
By contrast, manual tracking needs middleware, controller logic, exception handling, and often hundreds of lines. With ABP, a couple of lines enable it and it just works. |
|||
|
|||
## What You Get with ABP |
|||
|
|||
Here’s how ABP removes tracking code from your application and still captures what you need. |
|||
|
|||
### 1. Application Services: No Tracking Code |
|||
|
|||
Manual approach: You’d log inside each method and still risk missing cases. |
|||
|
|||
ABP approach: Tracking is automatic—no tracking code in your methods. |
|||
|
|||
```csharp |
|||
public class BookAppService : ApplicationService |
|||
{ |
|||
private readonly IRepository<Book, Guid> _bookRepository; |
|||
private readonly IRepository<Author, Guid> _authorRepository; |
|||
|
|||
[Authorize(BookPermissions.Create)] |
|||
public virtual async Task<BookDto> CreateAsync(CreateBookDto input) |
|||
{ |
|||
// No need to write any tracking code! |
|||
// ABP automatically tracks: |
|||
// - Method calls and parameters |
|||
// - Calling user |
|||
// - Execution duration |
|||
// - Any exceptions thrown |
|||
|
|||
var author = await _authorRepository.GetAsync(input.AuthorId); |
|||
var book = new Book(input.Title, author, input.Price); |
|||
|
|||
await _bookRepository.InsertAsync(book); |
|||
|
|||
return ObjectMapper.Map<Book, BookDto>(book); |
|||
} |
|||
|
|||
[Authorize(BookPermissions.Update)] |
|||
public virtual async Task<BookDto> UpdateAsync(Guid id, UpdateBookDto input) |
|||
{ |
|||
var book = await _bookRepository.GetAsync(id); |
|||
|
|||
// No need to write any entity change tracking code! |
|||
// ABP automatically tracks entity changes: |
|||
// - Which properties changed |
|||
// - Old and new values |
|||
// - When the change happened |
|||
|
|||
book.ChangeTitle(input.Title); |
|||
book.ChangePrice(input.Price); |
|||
|
|||
await _bookRepository.UpdateAsync(book); |
|||
|
|||
return ObjectMapper.Map<Book, BookDto>(book); |
|||
} |
|||
} |
|||
``` |
|||
|
|||
With manual code, each method might need 20–30 lines for tracking. With ABP, it’s zero—and you still get richer data. |
|||
|
|||
For entity changes, ABP also saves you from writing comparison code. It handles: |
|||
- Property change detection |
|||
- Recording old and new values |
|||
- Complex types and collections |
|||
- Navigation property changes |
|||
- All with no extra code to maintain |
|||
|
|||
### 2. Entity Change Tracking: One Line to Turn It On |
|||
|
|||
Manual approach: You’d compare properties, serialize complex types, track collection changes, and write to storage. |
|||
|
|||
ABP approach: Mark the entity or select entities globally. |
|||
|
|||
```csharp |
|||
// Enable audit log for specific entity - one line of code solves all problems! |
|||
[Audited] |
|||
public class MyEntity : Entity<Guid> |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Description { get; set; } |
|||
|
|||
[DisableAuditing] // Exclude sensitive data - security control |
|||
public string InternalNotes { get; set; } |
|||
} |
|||
``` |
|||
|
|||
```csharp |
|||
// Or global configuration - batch processing |
|||
Configure<AbpAuditingOptions>(options => |
|||
{ |
|||
// Track all entities - one line of code tracks all entity changes |
|||
options.EntityHistorySelectors.AddAllEntities(); |
|||
|
|||
// Or use custom selector - precise control |
|||
options.EntityHistorySelectors.Add( |
|||
new NamedTypeSelector( |
|||
"MySelectorName", |
|||
type => typeof(IEntity).IsAssignableFrom(type) |
|||
) |
|||
); |
|||
}); |
|||
``` |
|||
|
|||
### 3. Extension Features |
|||
|
|||
Manual approach: Adding custom tracking usually spreads across many places and is hard to test. |
|||
|
|||
ABP approach: Use a contributor for clean, centralized extensions. |
|||
|
|||
```csharp |
|||
public class MyAuditLogContributor : AuditLogContributor |
|||
{ |
|||
public override void PreContribute(AuditLogContributionContext context) |
|||
{ |
|||
var currentUser = context.ServiceProvider.GetRequiredService<ICurrentUser>(); |
|||
|
|||
// Easily add custom properties - manual implementation needs lots of work |
|||
context.AuditInfo.SetProperty( |
|||
"MyCustomClaimValue", |
|||
currentUser.FindClaimValue("MyCustomClaim") |
|||
); |
|||
} |
|||
|
|||
public override void PostContribute(AuditLogContributionContext context) |
|||
{ |
|||
// Add custom comments - business logic integration |
|||
context.AuditInfo.Comments.Add("Some comment..."); |
|||
} |
|||
} |
|||
|
|||
// Register contributor - one line of code enables extension features |
|||
Configure<AbpAuditingOptions>(options => |
|||
{ |
|||
options.Contributors.Add(new MyAuditLogContributor()); |
|||
}); |
|||
``` |
|||
|
|||
### 4. Precise Control |
|||
|
|||
Manual approach: You end up with complex conditional logic. |
|||
|
|||
ABP approach: Use attributes for simple, precise control. |
|||
|
|||
```csharp |
|||
// Disable audit log for specific controller - precise control |
|||
[DisableAuditing] |
|||
public class HomeController : AbpController |
|||
{ |
|||
// Health check endpoints won't be audited - avoid meaningless logs |
|||
} |
|||
|
|||
// Disable for specific action - method-level control |
|||
public class HomeController : AbpController |
|||
{ |
|||
[DisableAuditing] |
|||
public async Task<ActionResult> Home() |
|||
{ |
|||
// This action won't be audited - public data access |
|||
} |
|||
|
|||
public async Task<ActionResult> OtherActionLogged() |
|||
{ |
|||
// This action will be audited - important business operation |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### 5. Visual Management of Audit Logs |
|||
|
|||
ABP also provides a UI to browse and inspect audit logs: |
|||
|
|||
 |
|||
|
|||
 |
|||
|
|||
## Manual vs. ABP: A Quick Comparison |
|||
|
|||
The benefits of ABP’s audit log system compared to doing it by hand: |
|||
|
|||
| Aspect | Manual Implementation | ABP Audit Logs | |
|||
|--------|----------------------|----------------| |
|||
| **Setup Complexity** | High — Write middleware, services, repository code | Low — A few lines of config, works out of the box | |
|||
| **Code Maintenance** | High — Tracking code spread across the app | Low — Centralized, convention-based | |
|||
| **Consistency** | Variable — Depends on discipline | Consistent — Automated and standardized | |
|||
| **Performance** | Risky without careful tuning | Built-in optimizations and scope control | |
|||
| **Functionality Completeness** | Basic tracking only | Comprehensive by default | |
|||
| **Error Handling** | Easy to miss edge cases | Automatic and reliable | |
|||
| **Data Integrity** | Manual effort required | Handled by the framework | |
|||
| **Extensibility** | Custom work is costly | Rich extension points | |
|||
| **Development Efficiency** | Weeks to build | Minutes to enable | |
|||
| **Learning Cost** | Understand many details | Convention-based, low effort | |
|||
|
|||
## Why ABP Audit Logs Matter |
|||
|
|||
ABP’s audit logging removes the boilerplate from user tracking in ASP.NET Core apps. |
|||
|
|||
### Core Idea |
|||
|
|||
Manual tracking is error-prone and hard to maintain. ABP gives you a convention-based, automated system that works with minimal setup. |
|||
|
|||
### Key Benefits |
|||
|
|||
ABP runs by convention, so you don’t need repetitive code. You can control behavior at the request, entity, and method levels. It automatically captures request details, operations, entity changes, and exceptions, and you can extend it with contributors when needed. |
|||
|
|||
### Results in Practice |
|||
|
|||
| Metric | Manual Implementation | ABP Implementation | Improvement | |
|||
|--------|----------------------|-------------------|-------------| |
|||
| Development Time | Weeks | Minutes | **99%+** | |
|||
| Lines of Code | Hundreds of lines | 2 lines of config | **99%+** | |
|||
| Maintenance Cost | High | Low | **Significant** | |
|||
| Functionality Completeness | Basic | Comprehensive | **Significant** | |
|||
| Error Rate | Higher risk | Lower risk | **Improved** | |
|||
|
|||
### Recommendation |
|||
|
|||
If you need audit logs, start with ABP’s built-in system. It reduces effort, improves consistency, and stays flexible as your app grows. You can focus on your business logic and let the framework handle the infrastructure. |
|||
|
|||
## References |
|||
|
|||
- [ABP Audit Logging](https://abp.io/docs/latest/framework/infrastructure/audit-logging) |
|||
- [ABP Audit Logging UI](https://abp.io/modules/Volo.AuditLogging.Ui) |
|||
|
After Width: | Height: | Size: 520 KiB |
@ -0,0 +1,173 @@ |
|||
# .NET 10: What You Need to Know (LTS Release, Coming November 2025) |
|||
|
|||
The next version of .NET is .NET 10 and it is coming with **Long-Term Support (LTS)**, scheduled for **November 2025**. |
|||
|
|||
On **September 9, 2025**, Microsoft released **.NET 10 Release Candidate 1 (RC1)**, which supports go-live usage and is compatible with [Visual Studio 2026 Insider](https://visualstudio.microsoft.com/insiders/) and [Visual Studio Code Insider](https://code.visualstudio.com/insiders/) via the [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) extension. |
|||
|
|||
------ |
|||
|
|||
## .NET 10 Runtime Enhancements |
|||
|
|||
- **JIT Speed-ups**: Enhanced struct argument handling—members now go directly into registers, reducing memory load/store operations. |
|||
- **Advanced Loop Optimization**: New graph-based loop inversion improves precision and boosts further optimizations. |
|||
- **Array Interface De-virtualization**: Critical for performance, now array-based enumerations inline and skip virtual calls including de-abstraction of array enumeration and small-array stack allocation. |
|||
- **General JIT Improvements**: Better code layout and branch reduction support overall efficiency. |
|||
|
|||
------ |
|||
|
|||
## Language & Library Upgrades |
|||
|
|||
### C# 14 Enhancements |
|||
|
|||
- Field-backed properties: easier custom getters/setters. |
|||
- `nameof` for unbound generics like `List<>`. |
|||
- Implicit conversions for `Span<T>` and `ReadOnlySpan<T>`. |
|||
- Lambda parameter modifiers (`ref`, `in`, `out`). |
|||
- Partial constructors/events. |
|||
- `extension` blocks for static extension members. |
|||
- Null-conditional assignment (`?.=`) and custom compound/increment operators. |
|||
|
|||
### F# & Visual Basic Enhancements |
|||
|
|||
- F# improvements via `<LangVersion>preview</LangVersion>`, updated `FSharp.Core`, and compiler fixes. |
|||
- VB compiler supports `unmanaged` generics and respects `OverloadResolutionPriorityAttribute` for performance and overload clarity. |
|||
|
|||
## .NET Libraries & SDK |
|||
|
|||
### Libraries: |
|||
|
|||
- Better ZipArchive performance (lazy entry loading). |
|||
- JSON improvements, including `JsonSourceGenerationOptions` and reference-handling tweaks. |
|||
- Enhanced `OrderedDictionary`, ISOWeek date APIs, PEM data and certificate handling, `CompareOptions.NumericOrdering` |
|||
|
|||
### SDK & CLI: |
|||
|
|||
- No major new SDK features in RC1—you should expect stability fixes rather than additions. |
|||
- Earlier previews brought JSON support improvements (e.g., `PipeReader` for JSON, WebSocketStream, ML-DSA crypto, AES KeyWrap), TLS 1.3 for macOS |
|||
|
|||
------ |
|||
|
|||
## ASP.NET Core & Blazor |
|||
|
|||
### Blazor & Web App Security: |
|||
|
|||
Enhanced OIDC and Microsoft Entra ID integration, including encrypted token caching and Key Vault use. |
|||
|
|||
### UI Enhancements: |
|||
|
|||
- `QuickGrid` gains `RowClass` for conditional styling. |
|||
- Scripts now served as static assets with compression and fingerprinting. |
|||
- NavigationManager no longer scrolls to top for same-page updates. |
|||
|
|||
### API Improvements: |
|||
|
|||
Full support for OpenAPI 3.1 (JSON Schema draft 2020-12), and metrics for authentication/authorization events (e.g., sign-ins, logins) . |
|||
|
|||
------ |
|||
|
|||
## .NET MAUI |
|||
|
|||
Updates include multiple file selection, image compression, WebView request interception, and support for Android API 35/36. |
|||
|
|||
## EF Core |
|||
|
|||
LINQ enhancements, performance boosts, better Azure Cosmos DB support, and more flexible named query filters. |
|||
|
|||
|
|||
|
|||
## Breaking Changes in .NET 10 |
|||
|
|||
### ASP.NET Core - Breaking Changes in .NET 10: |
|||
|
|||
.NET 10 Preview 7 brings **several deprecations + behavior changes**, while **RC1 removes the old WebHost model**. |
|||
|
|||
- **[Cookie login redirects disabled](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/cookie-authentication-api-endpoints)** → Redirects no longer occur for API endpoints; APIs now return `401`/`403`. *(Behavioral change)* |
|||
- **[WithOpenApi deprecated](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/withopenapi-deprecated)** → Extension method removed; use updated OpenAPI generator features. *(Source incompatible)* |
|||
- **[Exception diagnostics suppressed](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/exception-handler-diagnostics-suppressed)** → When `TryHandleAsync` returns true, exception details aren’t logged. *(Behavioral change)* |
|||
- **[IActionContextAccessor obsolete](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/iactioncontextaccessor-obsolete)** → Marked obsolete; may break code depending on it. *(Source/behavioral change)* |
|||
- **[IncludeOpenAPIAnalyzers deprecated](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/openapi-analyzers-deprecated)** → Property and MVC API analyzers removed. *(Source incompatible)* |
|||
- **[IPNetwork & KnownNetworks obsolete](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/ipnetwork-knownnetworks-obsolete)** → Old networking APIs removed in favor of new ones. *(Source incompatible)* |
|||
- **[ApiDescription.Client package deprecated](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/apidescription-client-deprecated)** → No longer maintained; migrate to other tools. *(Source incompatible)* |
|||
- **[Razor run-time compilation obsolete](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete)** → Disabled at runtime; precompilation required. *(Source incompatible)* |
|||
- **[WebHostBuilder, IWebHost, WebHost obsolete](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/webhostbuilder-deprecated)** → Legacy hosting model deprecated; use `WebApplicationBuilder`. *(Source incompatible, RC1)* |
|||
|
|||
### EF Core - Breaking Changes in .NET 10: |
|||
|
|||
You can find the complete list at [Microsoft EF Core 10 Breaking Changes page](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-10.0/breaking-changes). Here's the brief summary: |
|||
|
|||
#### EF Core - SQL Server |
|||
|
|||
- **JSON column type by default (Azure SQL / compat level ≥170).** Primitive collections and owned types mapped to JSON now use SQL Server’s native `json` type instead of `nvarchar(max)`. A migration may alter existing columns. Mitigate by setting compat level <170 or explicitly forcing `nvarchar(max)`. |
|||
- **`ExecuteUpdateAsync` signature change.** Column setters now take a regular `Func<…>` (not an expression). Dynamic expression-tree code won’t compile; replace with imperative setters inside the lambda. |
|||
|
|||
#### Microsoft.Data.Sqlite |
|||
|
|||
- **`GetDateTimeOffset` (no offset) assumes UTC.** Previously assumed local time. You can temporarily revert via `AppContext.SetSwitch("Microsoft.Data.Sqlite.Pre10TimeZoneHandling", true)`. |
|||
- **Writing `DateTimeOffset` to REAL stores UTC.** Conversion now happens before writing; revertable with the same switch. |
|||
- **`GetDateTime` (with offset) returns UTC `DateTime` (`DateTimeKind.Utc`).** Was `Local` before. Same temporary switch if needed. |
|||
|
|||
#### Who’s most affected |
|||
|
|||
- Apps on **Azure SQL / SQL Server 2025** using JSON mapping. |
|||
- Codebases building **expression trees** for bulk updates. |
|||
- Apps using **SQLite** with date/time parsing or REAL timestamp storage. |
|||
|
|||
#### Quick mitigations |
|||
|
|||
- Set SQL Server compatibility <170 or force column type. |
|||
- Rewrite `ExecuteUpdateAsync` callers to use the new delegate form. |
|||
- For SQLite, update handling to UTC or use the temporary AppContext switch while transitioning. |
|||
|
|||
### Containers - Breaking Changes in .NET 10: |
|||
|
|||
Default .NET images now use [Ubuntu](https://learn.microsoft.com/en-us/dotnet/core/compatibility/containers/10.0/default-images-use-ubuntu). |
|||
|
|||
### Core Libraries - Breaking Changes in .NET 10: |
|||
|
|||
[ActivitySource](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/activity-sampling) behavior tweaks; [generic math](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/generic-math) shift behavior aligned; W3C trace context is [default](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/default-trace-context-propagator); [DriveInfo](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/driveinfo-driveformat-linux) reports Linux FS types; InlineArray size rules tightened; [System.Linq.AsyncEnumerable](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/asyncenumerable) included in core libs... |
|||
|
|||
### Cryptography - Breaking Changes in .NET 10: |
|||
|
|||
[Stricter X500](https://learn.microsoft.com/en-us/dotnet/core/compatibility/cryptography/10.0/x500distinguishedname-validation) name validation; [OpenSSL](https://learn.microsoft.com/en-us/dotnet/core/compatibility/cryptography/10.0/openssl-macos-unsupported) primitives unsupported on macOS; [some key members](https://learn.microsoft.com/en-us/dotnet/core/compatibility/cryptography/10.0/mldsa-slhdsa-secretkey-to-privatekey) nullable/renamed; env var [rename to](https://learn.microsoft.com/en-us/dotnet/core/compatibility/cryptography/10.0/version-override) `DOTNET_OPENSSL_VERSION_OVERRIDE`. |
|||
|
|||
### Extensions - Breaking Changes in .NET 10: |
|||
|
|||
[Config preserves](https://learn.microsoft.com/en-us/dotnet/core/compatibility/extensions/10.0/configuration-null-values-preserved) nulls; [logging](https://learn.microsoft.com/en-us/dotnet/core/compatibility/extensions/10.0/console-json-logging-duplicate-messages)/[package](https://learn.microsoft.com/en-us/dotnet/core/compatibility/extensions/10.0/provideraliasattribute-moved-assembly)/trim annotations changes; some [trim-unsafe](https://learn.microsoft.com/en-us/dotnet/core/compatibility/extensions/10.0/dynamically-accessed-members-configuration) code annotations removed. |
|||
|
|||
### Globalization & Interop - Breaking Changes in .NET 10: |
|||
|
|||
[ICU](https://learn.microsoft.com/en-us/dotnet/core/compatibility/globalization/10.0/version-override) env var renamed; single-file apps stop probing executable dir for native libs; [DllImport](https://learn.microsoft.com/en-us/dotnet/core/compatibility/interop/10.0/search-assembly-directory) search path tightened. |
|||
|
|||
Networking: |
|||
|
|||
[HTTP/3 disabled ](https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/10.0/http3-disabled-with-publishtrimmed) by default when trimming; [default cert revocation](https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/10.0/ssl-certificate-revocation-check-default) check now Online; [browser clients](https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/10.0/default-http-streaming) stream responses by default; [URI length limits](https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/10.0/uri-length-limits-removed) removed. |
|||
|
|||
### SDK & MSBuild/NuGet - Breaking Changes in .NET 10: |
|||
|
|||
`dotnet --interactive` [defaults to true](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/dotnet-cli-interactive); tool packages are [RID-specific](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/dotnet-tool-pack-publish); [workload](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/default-workload-config) sets default; `dotnet new sln` uses [SLNX](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/dotnet-new-sln-slnx-default); restore audits transitives; [local tool](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/dotnet-tool-install-local-manifest) install creates manifest by default; `project.json` [not supported](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/dotnet-restore-project-json-unsupported); stricter NuGet [validation](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/nuget-packageid-validation)/[errors](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/10.0/http-warnings-to-errors). |
|||
|
|||
WinForms/WPF: |
|||
|
|||
Multiple [API obsoletions](https://learn.microsoft.com/en-us/dotnet/core/compatibility/windows-forms/10.0/obsolete-apis)/parameter [renames](https://learn.microsoft.com/en-us/dotnet/core/compatibility/windows-forms/10.0/insertadjacentelement-orientation); [rendering](https://learn.microsoft.com/en-us/dotnet/core/compatibility/windows-forms/10.0/statusstrip-renderer)/behavior tweaks; stricter XAML rules (e.g., [disallow empty row](https://learn.microsoft.com/en-us/dotnet/core/compatibility/wpf/10.0/empty-grid-definitions)/column definitions or incorrect usage of [DynamicResource](https://learn.microsoft.com/en-us/dotnet/core/compatibility/wpf/10.0/dynamicresource-crash) will crash). |
|||
|
|||
|
|||
|
|||
------ |
|||
|
|||
|
|||
|
|||
## Support Policy for .NET 10 |
|||
As you can see from the picture below, **.NET 10 has long term support** therefore it will be maintained for 3 years **until November 2028**. |
|||
|
|||
[](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core) |
|||
|
|||
|
|||
|
|||
## Download .NET10 |
|||
|
|||
Click 👉 https://dotnet.microsoft.com/en-us/download/dotnet/10.0 to download the latest release candidate (currently RC.1). |
|||
|
|||
[](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) |
|||
|
|||
Also to use the latest features, download/update your Visual Studio to the latest 👉 https://visualstudio.microsoft.com/downloads/ |
|||
|
|||
|
After Width: | Height: | Size: 530 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 545 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 336 KiB |
@ -0,0 +1,282 @@ |
|||
# Web Design Basics for Graphic Designers Who Don't Code |
|||
|
|||
## Introduction |
|||
|
|||
As a **designer**, I have been working on **logos**, **posters**, and **social media announcement** **visuals** for years. However, when it comes to the web, I used to hold back saying “I **don’t know how to code**.” We have all thought about this at some point and unfortunately, we still think about it from time to time. |
|||
|
|||
🚀 **Good news**: We can learn **web design** without writing code and design **user-friendly**, **aesthetic, and functional web interfaces** using basic knowledge. |
|||
|
|||
In this article, we will talk about the **basics of web design**, its **differences from graphic design**, and whether it is possible to do **web design without knowing how to code**. |
|||
|
|||
## Differences Between Graphic Design & Web Design |
|||
|
|||
 |
|||
|
|||
### What is Graphic Design? |
|||
|
|||
Graphic design is creating **visual content** that conveys a message to a **specific audience**. Graphic designers use various **visual elements** such as **color**, **typography**, **imagery**, and **layout** to communicate a message effectively. They work on a wide range of projects, including **logos**, **websites**, **packaging**, **advertisements, and branding**. |
|||
|
|||
### What is Web Design? |
|||
|
|||
Web design is the process of creating a website that can be viewed on computers or mobile devices. Like graphic design, web design also involves creating **graphics**, **typography**, **and visuals**, but they use the **internet** as the communication channel. |
|||
|
|||
### Graphic Design |
|||
|
|||
* Graphic Design is concerned with **visuals** and **appearance**. |
|||
* Graphic design focuses on visually conveying specific messages or ideas through **typography**, **visuals**, **colors**, and i**llustrations**. |
|||
* Graphic design focuses on how objects **look**. |
|||
* Graphic designers **do not need coding knowledge**. |
|||
* Graphic design is **static**. |
|||
|
|||
### Web Design |
|||
|
|||
* Web design is user experience–focused. |
|||
* Web design aims to create **functional** and **user-friendly** **websites** that provide the **best experience** for users. |
|||
* Web design considers **search engine optimization** when creating websites. |
|||
* Web designers need to have **knowledge of HTML**, **CSS**, and other web development languages to create **functional and responsive designs**. |
|||
* Web design is **dynamic**. |
|||
|
|||
## Fundamental Principles of Web Design (Applicable Without Coding) |
|||
|
|||
Companies and **brands** from almost every sector request the **creation of their own websites**. This way, they gain the opportunity to introduce their **services**, **prices**, and themselves to their **target audiences**. However, for this to have the desired effect, the website must be **designed properly**. What are the **fundamental principles** to pay attention to when designing a website? Now, it’s time to answer this question by introducing the basics. Here are the **indispensable principles in web design**. |
|||
|
|||
### 1\) User-Centered Designs: |
|||
|
|||
Users always value **ease and practicality** when receiving a service. For this reason, it is important for websites to be designed in a user-centered way. **Easy to find menus**, **fast usage**, and the **easy to locate any information** are very important. With **user centered design**, it is possible to create websites that are **easy to use** and also **satisfy users**. |
|||
|
|||
|
|||
### 2\) Responsive Designs: |
|||
|
|||
It is very important for the website and its design to be **usable on every digital platform**. Therefore, the designed sites must have a **responsive design**. This means easy access to the site on a **phone**, **tablet**, or **computer**. This also ensures that users continue to prefer the site. |
|||
|
|||
### 3\) Visual Hierarchy: |
|||
|
|||
The page must have **visuals related to itself**, and **product content** should be matched with the **correct visuals**. It is also very important for visual elements to be placed according to their order of importance. On web pages, content compatible with visuals must be provided with **sufficient and accurate information**. |
|||
|
|||
### 4\) Color and Typography Selection: |
|||
|
|||
Color and typography selection is very important for handling visuals, colors, and text in a certain **harmony**. For the site to **attract attention** or for the relevant pages to achieve the expected interaction, the use of color and the chosen font style and font color must be harmonious. A design that is both **easy to read** and **eye catching** without causing any disturbance should be preferred. |
|||
|
|||
### 5\) Content and Layout Structure: |
|||
|
|||
One of the most desired features on web pages is **content organization**. Content that is **unrelated to the pages, creates confusion while reading**, or **lacks simplicity**, such as overly frequent paragraphs, incorrect fonts, and similar factors, causes web pages to have less impact. **Content structure** also includes **placing related topics sequentially** and **adding them to the menu**. For example, on a website created for shoes, if shoe types are grouped separately, users find it easier. Options like high heels, sandals, and sneakers help users find what they are looking for more easily, which in turn ensures positive site feedback. |
|||
|
|||
### 6\) Speed Optimization: |
|||
|
|||
As with every type of service, speed is very important for services provided through web pages. Easy navigation between pages, error-free performance, and ease of use are very important for users. No one wants to shop or use a service on a website that takes a long time to load, because everyone prefers websites to save time. |
|||
|
|||
### 7\) Consistency: |
|||
|
|||
For a service to be preferred, it must first be reliable. This is directly related to the information, visuals, and everything on the website. The information in the content, visuals, and content details must be consistent and should not raise any questions in visitors’ minds. Otherwise, negative feedback can later affect customer preferences and damage the brand image. |
|||
|
|||
## Is It Possible to Do Web Design Without Coding? |
|||
|
|||
In the past, it was not possible to create a website without at least some basic coding knowledge. However, today, almost anyone can build a website. Even if you have not written a **single line of code**. |
|||
|
|||
The biggest helpers for those who want to do **web development without coding** are **No-Code** and **Low-Code** platforms. These tools help users **design websites** without dealing with **technical details**. |
|||
|
|||
Systems like **Wix**, **Webflow**, **Shopify**, and **WordPress** are very common in this area. |
|||
|
|||
 |
|||
|
|||
The web development process on these platforms is carried out through practical methods such as **drag-and-drop**, selecting **ready-made templates**, and filling out forms. |
|||
|
|||
### **No Code** |
|||
|
|||
As the name suggests, it allows you to create websites, mobile applications, automations, and workflows **without writing a single line of code**. |
|||
|
|||
* **How Does It Work**? They usually have a visual editor. You create the skeleton of your application by dragging and dropping ready “building blocks” such as buttons, forms, and visuals onto your canvas. Then, you determine what these elements will do (for example, “go to this page when this button is clicked”) by selecting options from the menus. |
|||
* **Who Uses It**? It is perfect for entrepreneurs, marketers, product managers, designers, and anyone who wants to quickly test an idea. |
|||
* **Examples**: Platforms like Webflow, Bubble, Adalo, and Glide allow you to create a wide range of products, from complex web applications to mobile apps. |
|||
|
|||
### **Low Code** |
|||
|
|||
Low-Code systems require a bit more **technical knowledge** but still **do not require learning full-scale programming**. |
|||
|
|||
* **How Does It Work**? You handle 80% of the work with drag-and-drop, and for the remaining 20% that requires customization, you add small code snippets. |
|||
* **Who Uses It**? It is generally preferred by IT departments of corporate companies and technical teams that want to develop more complex, scalable applications. |
|||
* **Examples**: Platforms like OutSystems and Mendix are used to build large, integrated systems that manage a company’s internal processes. |
|||
|
|||
## What Should the Web Design Process be Like? |
|||
|
|||
 |
|||
|
|||
**Web design** is a passionate field but can be **overwhelming** at times. When starting out, coming up with a plan on how to tackle your website or a web app idea often feels daunting: Where should you begin?Web designers often think about the **web design process** with a focus on **technical matters** such as wireframes, code, and content management. But great |
|||
|
|||
design isn’t about how you integrate the social media buttons or even slick visuals. **Great design** is actually about having **a website creation process** that aligns with an **overarching strategy.** |
|||
|
|||
Doing all the thinking beforehand ensures that you don’t forget anything crucial. It also frees up headspace for doing the actual work, avoids overwhelm, improves efficiency, and allows you to build better websites on repeat. |
|||
|
|||
But how do you achieve that harmonious synthesis of elements? Through a **holistic web design** process that takes both **form and function** into account. |
|||
|
|||
We have already covered the fundamentals, now, I'll share the steps to an **effective web design process.** |
|||
|
|||
Let's get started. |
|||
|
|||
### 1\) Goal Identification |
|||
|
|||
In this **initial stage**, the designer needs to identify the end goal of the website design, usually in close collaboration with the client or other stakeholders. Questions to explore and answer in this stage of the design and website development process include: |
|||
|
|||
* Who is the site for? |
|||
* What do they hope to find or do there? |
|||
* Is the main purpose of this website to inform, to sell (e-commerce, for everyone?), or to entertain? |
|||
* Does the website need to clearly convey the **brand's core message**, or is it part of a broader **brand strategy** with its own unique focus? |
|||
* If there are any, which **competitor sites** exist, and how should this site be **inspired by them** / how should it differ from them? |
|||
|
|||
To have clear answers to above questions will lead to the **successful execution** of the project. |
|||
|
|||
### What Purpose Will the Website Serve? |
|||
|
|||
Whatever the project you’re taking on, you always want each and every initiative you take to achieve the goals you’ve set for it. **Goal setting is critical** because it will be key in making decisions throughout the project by asking yourself the right questions and **prioritizing tasks and efforts**. |
|||
|
|||
As basic as it may seem, following the **SMART framework** is always a great idea when setting your goals, to **ensure effectiveness:** |
|||
|
|||
**S \- SPECIFIC** |
|||
Your goal is direct, detailed, and meaningful. |
|||
|
|||
**M \- MEASURABLE** |
|||
Your goal is quantifiable to track progress or success. |
|||
|
|||
**A \- ATTAINABLE** |
|||
Your goal is realistic and you have the tools and/or resources to attain it. |
|||
|
|||
**R \- RELEVANT** |
|||
Your goal aligns with your company mission. |
|||
|
|||
**T \- TIME-BASED** |
|||
Your goal has a deadline. |
|||
|
|||
### 2\) Scope Definition |
|||
|
|||
This is easier said than done when starting out, so it is best to approach it with caution : Everyone has once been guilty of saying a project “will be done by next week” before realizing they dramatically **underestimated** how hard it would be. |
|||
|
|||
Nevertheless, **setting** a timeline will help a lot with **accountability**, both internal and external, and will help **break down the project in distinct stages**. |
|||
|
|||
You don’t have to reinvent anything from scratch, as a lot of tools such as Airtable’s timeline view will help you put the timeline together. |
|||
|
|||
 |
|||
|
|||
Source: [Airtable](https://blog.airtable.com/introducing-airtables-new-timeline-view/) |
|||
|
|||
### 3\) Sitemap and Wireframe Creation |
|||
|
|||
The site map forms the foundation of a well-designed website. It gives web designers a clear idea of the **information architecture** of the website and explains the **relationships** between various **pages and content elements**. |
|||
|
|||
 |
|||
|
|||
Building a web site without a site map is like building a house without a plan. And it rarely ends well. |
|||
|
|||
Time to start building the first iteration of your project\! To put it shortly, **wireframes** serve as a blueprint, a visual guide representing the skeletal framework of a website or application. It will be a raw version of your project, a great way to get your **initial idea down** in its first “physical” form. |
|||
|
|||
 |
|||
|
|||
Source: [Afolayan Daniel](https://medium.com/fbdevclagos/4-reasons-why-wire-frame-is-important-during-website-or-mobile-app-development-46fabdf47190) |
|||
|
|||
While it won’t be functional yet, it’ll be a major web design step to share with your team, potential leads or even investors, and will highlight issues that you might not have thought about previously. Wireframes are a great opportunity to move fast, once they’re ready, you’ll be able to: |
|||
|
|||
* Gather early feedback; |
|||
* Run UX testing groups; |
|||
* Iterate on your timeline if necessary; |
|||
* Get concept validation. |
|||
|
|||
There are different ways to create wireframes. You can of course sketch them out on paper to start with, but creating a digital version will eventually be much more practical to share them. |
|||
|
|||
#### Tools for sitemapping and wireframing; |
|||
|
|||
* Pen/pencil and paper. |
|||
* Balsamiq. |
|||
* Moqups. |
|||
* Sketch. |
|||
* Axure. |
|||
* Webflow. |
|||
* Slickplan. |
|||
* Writemaps. |
|||
* Mindnode. |
|||
* Figma. |
|||
* Sketch. |
|||
|
|||
### 4\) Content Creation |
|||
A website should offer more than just a simple design and attractive graphics. An effective content strategy is essential to capture users’ interest and to make the site stand out in search engines. |
|||
|
|||
 |
|||
When it comes to content, search engine optimization is only |
|||
half of the battle. |
|||
|
|||
There are two main goals that you need to focus on while creating content. |
|||
|
|||
#### **Goal 1 Content encourages engagement and action:** |
|||
|
|||
First of all, content drives readers to take action and encourages them to perform the actions necessary to achieve a site's goals. This is influenced both by the content itself (writing) and by the way it is presented (typography and structural elements). |
|||
|
|||
Boring, lifeless, and lengthy writing rarely holds visitors' attention for long enough. Short, fluent, and engaging content captures them and makes them click through to other pages. Even if your pages need a lot of content (which they often do), properly "breaking it up" into short paragraphs supported by visuals can help create a light and engaging feel. |
|||
|
|||
#### **Goal 2 Search Engine Optimization**: |
|||
|
|||
Content also increases a site's visibility in the eyes of search engines. The practice of creating and developing content to achieve a good ranking in search results is called search engine optimization or SEO. |
|||
|
|||
Identifying your keywords and key phrases correctly is very important for the success of any website. |
|||
|
|||
### 5\) Visual Elements |
|||
|
|||
 |
|||
|
|||
Style Tile: a free style tile / moodboard template built by Mat Vogels. |
|||
|
|||
It is time to create the **visual style** of the site. This part of the design process is usually shaped by **existing brand elements, color choices**, and **logos** specified by the client. However, it is also the stage of the web design process where a **good web designer can truly shine**. |
|||
|
|||
**Visuals play a more important** **role** in web design than ever before. High quality visuals not only give a website a professional look and feel, but also convey a message, are mobile friendly, and help build trust. |
|||
|
|||
**Visual design is a way of communicating** with the web site users to make the site as **appealing to them** as possible. When done right, it can determine the site’s being one of the major successes amongst competitors. On the other hand, any mistake might put it in risk of becoming just another ordinary web site. |
|||
|
|||
**Tools for visual elements**: |
|||
|
|||
* (Sketch, Illustrator, Photoshop, Figma, vb.) |
|||
* Visual Style Guides. |
|||
|
|||
|
|||
|
|||
### 6\) Development & Platforms |
|||
|
|||
**Front-End Development**: The parts that users interact with (HTML, CSS, JavaScript). |
|||
|
|||
**Back-End Developmen**t: Database and server-side processes (PHP, Python, Node.js). |
|||
|
|||
**No-Code Platforms**: Publishing on platforms like Webflow, Bubble, Adalo, Glide. |
|||
|
|||
### 7\) Testing |
|||
|
|||
When your site has all the visuals and content, you are ready to test. |
|||
Once the **first iteration** of your website/web app is ready, it’s time for some **testing** to make sure it **runs smoothly**. |
|||
|
|||
A website should undergo a detailed testing process before going live. |
|||
Items to check during the testing process: |
|||
|
|||
* Mobile Compatibility. |
|||
* Functionality across different browsers. |
|||
* Functionality of forms and buttons. |
|||
|
|||
Alongside these steps, setting up website uptime monitoring is essential to ensure the site remains functional after launch, providing immediate alerts if any downtime occurs. Ultimately, while testing is an important part of the web design process, it’s not worth losing sleep over. **Done is always better than perfect** and when in doubt, keep this quote in mind. |
|||
|
|||
*“If you are not embarrassed by the first version of your product, you've launched too late.” \- Reid Hoffman, founder of LinkedIn* |
|||
|
|||
### 8\) Website Launch |
|||
|
|||
Now it’s time for everyone’s favorite part of the website design process: When everything has been thoroughly tested and you’re happy with the site, you can start. |
|||
|
|||
Don’t expect this to go perfectly. There may still be some elements that need fixing. Web design is a fluid and ongoing process that requires constant maintenance. |
|||
|
|||
Web design and design in general is about finding the right balance between form and function. You need to use the right fonts, colors, and design motifs. But the way users navigate and experience your site is just as important. |
|||
|
|||
## Conclusion |
|||
|
|||
Previously, when we wanted to turn our designs into reality, the barrier of learning and using a programming language tool stood in our way. This barrier has now been removed thanks to **No-Code tools**. With these tools, even without coding knowledge, there is now a way to bring your designs to life. |
|||
|
|||
## Resources |
|||
|
|||
* Bulut, B. (2025, July 20). *Kod yazmayı bilmeden yazılımcı olmak nasıl mümkün oldu?* Webtekno. [https://www.webtekno.com/kod-bilmeden-yazilimci-olmak-nasil-mumkun-oldu-h159799.html](https://www.webtekno.com/kod-bilmeden-yazilimci-olmak-nasil-mumkun-oldu-h159799.html) |
|||
|
|||
* Ectasarim. (2024, Kasım 10). *Web tasarım ilkeleri nelerdir? Önemli hususlar*. [https://www.ectasarim.com/web-tasarim-ilkeleri/](https://www.ectasarim.com/web-tasarim-ilkeleri/?utm_source=chatgpt.com) |
|||
|
|||
* Meazey, M. (2020, February 12). *The web design process in 7 simple steps*. *Webflow Blog*. [https://webflow.com/blog/the-web-design-process-in-7-simple-steps](https://webflow.com/blog/the-web-design-process-in-7-simple-steps) |
|||
|
|||
* University of California Office of the President. (2016). *How to write SMART goals: A how-to guide.* University of California. [https://www.ucop.edu/local-human-resources/\_files/performance-appraisal/How+to+write+SMART+Goals+v2.pdf](https://www.ucop.edu/local-human-resources/_files/performance-appraisal/How+to+write+SMART+Goals+v2.pdf) |
|||
@ -1,7 +0,0 @@ |
|||
# Dynamic Proxying / Interceptors |
|||
|
|||
This document is planned to be written later. |
|||
|
|||
## See Also |
|||
|
|||
* [Video tutorial](https://abp.io/video-courses/essentials/interception) |
|||
@ -0,0 +1,213 @@ |
|||
# Interceptors |
|||
|
|||
ABP provides a powerful interception system that allows you to execute custom logic before and after method calls without modifying the original method code. This is achieved through **dynamic proxying** and is extensively used throughout the ABP framework to implement cross-cutting concerns. ABP's interception is implemented on top of the [Castle DynamicProxy](https://www.castleproject.org/projects/dynamicproxy/) library. |
|||
|
|||
## What is Dynamic Proxying / Interception? |
|||
|
|||
**Interception** is a technique that allows executing additional logic before or after a method call without directly modifying the method's code. This is achieved through **dynamic proxying**, where the runtime generates proxy classes that wrap the original class. |
|||
|
|||
When a method is called on a proxied object: |
|||
1. The call is intercepted by the proxy |
|||
2. Custom behaviors (like logging, validation, or authorization) can be executed |
|||
3. The original method is called |
|||
4. Additional logic can be executed after the method completes |
|||
|
|||
This enables **cross-cutting concerns** (logic that applies across many parts of an application) to be handled in a clean, reusable way without code duplication. |
|||
|
|||
## Similarities and Differences with MVC Action/Page Filters |
|||
|
|||
If you are familiar with ASP.NET Core MVC, you've likely used **action filters** or **page filters**. Interceptors are conceptually similar but have some key differences: |
|||
|
|||
### Similarities |
|||
|
|||
* Both allow executing code before and after method execution |
|||
* Both are used to implement cross-cutting concerns like validation, logging, caching, or exception handling |
|||
* Both support asynchronous operations |
|||
|
|||
### Differences |
|||
|
|||
* **Scope**: Filters are tied to MVC's request pipeline, while interceptors can be applied to **any class or service** in the application |
|||
* **Configuration**: Filters are configured via attributes or middleware in MVC, while interceptors in ABP are applied through **dependency injection and dynamic proxies** |
|||
* **Target**: Interceptors can target application services, domain services, repositories, and virtually any service resolved from the IoC container—not just web controllers |
|||
|
|||
## How ABP Uses Interceptors |
|||
|
|||
ABP Framework extensively leverages interception to provide built-in features without requiring boilerplate code. Here are some key examples: |
|||
|
|||
### [Unit of Work (UOW)](../architecture/domain-driven-design/unit-of-work.md) |
|||
|
|||
Automatically begins and commits/rolls back a database transaction when entering or exiting an application service method. This ensures data consistency without manual transaction management. |
|||
|
|||
### [Input Validation](../fundamentals/validation.md) |
|||
|
|||
Input DTOs are automatically validated against data annotation attributes and custom validation rules before executing the service logic, providing consistent validation behavior across all services. |
|||
|
|||
### [Authorization](../fundamentals/authorization.md) |
|||
|
|||
Checks user permissions before allowing the execution of application service methods, ensuring security policies are enforced consistently. |
|||
|
|||
### [Feature](./features.md) & [Global Feature](./global-features.md) Checking |
|||
|
|||
Checks if a feature is enabled before executing the service logic, allowing you to conditionally enable or restrict functionality for tenants or the application. |
|||
|
|||
### [Auditing](./audit-logging.md) |
|||
|
|||
Automatically logs who performed an action, when it happened, what parameters were used, and what data was involved, providing comprehensive audit trails. |
|||
|
|||
## Building Your Own Interceptor |
|||
|
|||
You can create custom interceptors in ABP to implement your own cross-cutting concerns. |
|||
|
|||
### Creating an Interceptor |
|||
|
|||
Create a class that inherits from `AbpInterceptor`: |
|||
|
|||
````csharp |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Aspects; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.DynamicProxy; |
|||
|
|||
public class ExecutionTimeLogInterceptor : AbpInterceptor, ITransientDependency |
|||
{ |
|||
private readonly ILogger<ExecutionTimeLogInterceptor> _logger; |
|||
|
|||
public ExecutionTimeLogInterceptor(ILogger<ExecutionTimeLogInterceptor> logger) |
|||
{ |
|||
_logger = logger; |
|||
} |
|||
|
|||
public override async Task InterceptAsync(IAbpMethodInvocation invocation) |
|||
{ |
|||
var sw = Stopwatch.StartNew(); |
|||
|
|||
_logger.LogInformation($"Executing {invocation.TargetObject.GetType().Name}.{invocation.Method.Name}"); |
|||
|
|||
// Proceed to the actual target method |
|||
await invocation.ProceedAsync(); |
|||
|
|||
sw.Stop(); |
|||
|
|||
_logger.LogInformation($"Executed {invocation.TargetObject.GetType().Name}.{invocation.Method.Name} in {sw.ElapsedMilliseconds} ms"); |
|||
} |
|||
} |
|||
```` |
|||
|
|||
### Register Interceptors |
|||
|
|||
Create a static class that contains the `RegisterIfNeeded` method and register the interceptor in the `PreConfigureServices` method of your module. |
|||
|
|||
The `ShouldIntercept` method is used to determine if the interceptor should be registered for the given type. You can add an `IExecutionTimeLogEnabled` interface and implement it in the classes that you want to intercept. |
|||
|
|||
> `DynamicProxyIgnoreTypes` is static class that contains the types that should be ignored by the interceptor. See [Performance Considerations](#performance-considerations) for more information. |
|||
|
|||
````csharp |
|||
// Define an interface to mark the classes that should be intercepted |
|||
public interface IExecutionTimeLogEnabled |
|||
{ |
|||
} |
|||
```` |
|||
|
|||
````csharp |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
// A simple service that added to the DI container and will be intercepted since it implements the `IExecutionTimeLogEnabled` interface |
|||
public class SampleExecutionTimeService : IExecutionTimeLogEnabled, ITransientDependency |
|||
{ |
|||
public virtual async Task DoWorkAsync() |
|||
{ |
|||
// Simulate a long-running task to test the interceptor |
|||
await Task.Delay(1000); |
|||
} |
|||
} |
|||
```` |
|||
|
|||
````csharp |
|||
using System; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.DynamicProxy; |
|||
|
|||
public static class ExecutionTimeLogInterceptorRegistrar |
|||
{ |
|||
public static void RegisterIfNeeded(IOnServiceRegistredContext context) |
|||
{ |
|||
if (ShouldIntercept(context.ImplementationType)) |
|||
{ |
|||
context.Interceptors.TryAdd<ExecutionTimeLogInterceptor>(); |
|||
} |
|||
} |
|||
|
|||
private static bool ShouldIntercept(Type type) |
|||
{ |
|||
return !DynamicProxyIgnoreTypes.Contains(type) && typeof(IExecutionTimeLogEnabled).IsAssignableFrom(type); |
|||
} |
|||
} |
|||
```` |
|||
|
|||
````csharp |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.OnRegistered(ExecutionTimeLogInterceptorRegistrar.RegisterIfNeeded); |
|||
} |
|||
```` |
|||
|
|||
## Restrictions and Important Notes |
|||
|
|||
### Always use asynchronous methods |
|||
|
|||
For best performance and reliability, implement your service methods as asynchronous to avoid **async over sync**, that can cause unexpected problems, For more information, see [Should I expose synchronous wrappers for asynchronous methods?](https://devblogs.microsoft.com/dotnet/should-i-expose-synchronous-wrappers-for-asynchronous-methods/) |
|||
|
|||
### Virtual Methods Requirement |
|||
|
|||
For **class proxies**, methods need to be marked as `virtual` so that they can be overridden by the proxy. Otherwise, interception will not occur. |
|||
|
|||
````csharp |
|||
public class MyService : IExecutionTimeLogEnabled, ITransientDependency |
|||
{ |
|||
// This method CANNOT be intercepted (not virtual) |
|||
public void CannotBeIntercepted() |
|||
{ |
|||
} |
|||
|
|||
// This method CAN be intercepted (virtual) |
|||
public virtual void CanBeIntercepted() |
|||
{ |
|||
} |
|||
} |
|||
```` |
|||
|
|||
> This restriction does **not** apply to interface-based proxies. If your service implements an interface and is injected via that interface, all methods can be intercepted regardless of the `virtual` keyword. |
|||
|
|||
### Dependency Injection Scope |
|||
|
|||
Interceptors only work when services are resolved from the dependency injection container. Direct instantiation with `new` bypasses interception: |
|||
|
|||
````csharp |
|||
// This will NOT be intercepted |
|||
var service = new MyService(); |
|||
service.CannotBeIntercepted(); |
|||
|
|||
// This WILL be intercepted (if MyService is registered with DI) |
|||
var service = serviceProvider.GetService<MyService>(); |
|||
service.CanBeIntercepted(); |
|||
```` |
|||
|
|||
### Performance Considerations |
|||
|
|||
Interceptors are generally efficient, but each one adds method-call overhead. Keep the number of interceptors minimal on hot paths. |
|||
|
|||
Castle DynamicProxy can negatively impact performance for certain components, notably ASP.NET Core MVC controllers. See the discussions in [castleproject/Core#486](https://github.com/castleproject/Core/issues/486) and [abpframework/abp#3180](https://github.com/abpframework/abp/issues/3180). |
|||
|
|||
ABP uses interceptors for features like UOW, auditing, and authorization, which rely on dynamic proxy classes. For controllers, prefer implementing cross-cutting concerns with middleware or MVC/Page filters instead of dynamic proxies. |
|||
|
|||
To avoid generating dynamic proxies for specific types, use the static class `DynamicProxyIgnoreTypes` and add the base classes of the types to the list. Subclasses of any listed base class are also ignored. ABP framework already adds some base classes to the list (`ComponentBase, ControllerBase, PageModel, ViewComponent`); you can add more base classes if needed. |
|||
|
|||
> Always use interface-based proxies instead of class-based proxies for better performance. |
|||
|
|||
## See Also |
|||
|
|||
* [Video tutorial: Interceptors in ABP Framework](https://abp.io/video-courses/essentials/interception) |
|||
* [Castle DynamicProxy](https://www.castleproject.org/projects/dynamicproxy/) |
|||
* [Castle.Core.AsyncInterceptor](https://github.com/JSkimming/Castle.Core.AsyncInterceptor) |
|||
* [ASP.NET Core Filters](https://learn.microsoft.com/en-us/aspnet/core/mvc/controllers/filters) |
|||
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Concurrent; |
|||
|
|||
using System.Reflection; |
|||
using MongoDB.Bson.Serialization; |
|||
|
|||
namespace Volo.Abp.MongoDB; |
|||
|
|||
public static class AbpBsonSerializer |
|||
{ |
|||
private static readonly ConcurrentDictionary<Type, IBsonSerializer> Cache; |
|||
|
|||
static AbpBsonSerializer() |
|||
{ |
|||
var registry = BsonSerializer.SerializerRegistry; |
|||
var type = typeof(BsonSerializerRegistry); |
|||
var cacheField = type.GetField("_cache", BindingFlags.NonPublic | BindingFlags.Instance) ?? |
|||
throw new AbpException($"Cannot find _cache field of {type.FullName}."); |
|||
Cache = (ConcurrentDictionary<Type, IBsonSerializer>)cacheField.GetValue(registry)!; |
|||
} |
|||
|
|||
public static void RemoveSerializer<T>() |
|||
{ |
|||
Cache.TryRemove(typeof(T), out _); |
|||
} |
|||
|
|||
public static ConcurrentDictionary<Type, IBsonSerializer> GetSerializerCache() |
|||
{ |
|||
return Cache; |
|||
} |
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
using System.Text.Json; |
|||
using Shouldly; |
|||
using Xunit; |
|||
|
|||
namespace Volo.Abp.Json; |
|||
|
|||
public class ObjectToInferredTypesConverter_Tests : AbpJsonSystemTextJsonTestBase |
|||
{ |
|||
private readonly IJsonSerializer _jsonSerializer; |
|||
|
|||
public ObjectToInferredTypesConverter_Tests() |
|||
{ |
|||
_jsonSerializer = GetRequiredService<IJsonSerializer>(); |
|||
} |
|||
|
|||
[Fact] |
|||
public void Test() |
|||
{ |
|||
var objString = _jsonSerializer.Serialize(new object()); |
|||
objString.ShouldBe("{}"); |
|||
var obj = _jsonSerializer.Deserialize<object>(objString); |
|||
obj.ShouldBeOfType<JsonElement>(); |
|||
|
|||
var booleanString = _jsonSerializer.Serialize(true); |
|||
booleanString.ShouldBe("true"); |
|||
var boolean = _jsonSerializer.Deserialize<bool>(booleanString); |
|||
boolean.ShouldBe(true); |
|||
|
|||
var booleanString2 = _jsonSerializer.Serialize(false); |
|||
booleanString2.ShouldBe("false"); |
|||
var boolean2 = _jsonSerializer.Deserialize<bool>(booleanString2); |
|||
boolean2.ShouldBe(false); |
|||
|
|||
var numberString = _jsonSerializer.Serialize(1); |
|||
numberString.ShouldBe("1"); |
|||
var number = _jsonSerializer.Deserialize<long>(numberString); |
|||
number.ShouldBe(1); |
|||
|
|||
var numberString2 = _jsonSerializer.Serialize(1.1); |
|||
numberString2.ShouldBe("1.1"); |
|||
var number2 = _jsonSerializer.Deserialize<double>(numberString2); |
|||
number2.ShouldBe(1.1); |
|||
|
|||
var dateString = _jsonSerializer.Serialize(System.DateTime.Parse("2024-01-01")); |
|||
dateString.ShouldBe("\"2024-01-01T00:00:00\""); |
|||
var date = _jsonSerializer.Deserialize<System.DateTime>(dateString); |
|||
date.ShouldBe(System.DateTime.Parse("2024-01-01")); |
|||
|
|||
var textString = _jsonSerializer.Serialize("text"); |
|||
textString.ShouldBe("\"text\""); |
|||
var text = _jsonSerializer.Deserialize<string>(textString); |
|||
text.ShouldBe("text"); |
|||
} |
|||
} |
|||
@ -0,0 +1,158 @@ |
|||
using System; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Riok.Mapperly.Abstractions; |
|||
using Shouldly; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.Mapperly.SampleClasses; |
|||
using Volo.Abp.ObjectExtending; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Volo.Abp.Testing; |
|||
using Xunit; |
|||
|
|||
namespace Volo.Abp.Mapperly; |
|||
|
|||
public class ExtraProperties_Dictionary_Reference_Tests : AbpIntegratedTest<MapperlyTestModule> |
|||
{ |
|||
private readonly IObjectMapper _objectMapper; |
|||
|
|||
public ExtraProperties_Dictionary_Reference_Tests() |
|||
{ |
|||
_objectMapper = ServiceProvider.GetRequiredService<IObjectMapper>(); |
|||
} |
|||
|
|||
[Fact] |
|||
public void Should_Create_New_ExtraProperties_Dictionary_When_Same_Reference() |
|||
{ |
|||
// Arrange: Create a shared ExtraProperties dictionary
|
|||
var sharedExtraProperties = new ExtraPropertyDictionary |
|||
{ |
|||
{"TestProperty", "TestValue"}, |
|||
{"NumberProperty", 42} |
|||
}; |
|||
|
|||
var source = new TestEntityWithExtraProperties |
|||
{ |
|||
Id = Guid.NewGuid(), |
|||
Name = "Source Entity" |
|||
}; |
|||
|
|||
var destination = new TestEntityDtoWithExtraProperties |
|||
{ |
|||
Id = Guid.NewGuid(), |
|||
Name = "Destination DTO" |
|||
}; |
|||
|
|||
// Make both source and destination reference the same ExtraProperties dictionary
|
|||
SetExtraPropertiesReference(source, sharedExtraProperties); |
|||
SetExtraPropertiesReference(destination, sharedExtraProperties); |
|||
|
|||
// Verify they have the same reference before mapping
|
|||
ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeTrue(); |
|||
source.ExtraProperties.Count.ShouldBe(2); |
|||
destination.ExtraProperties.Count.ShouldBe(2); |
|||
|
|||
// Act: Perform mapping
|
|||
_objectMapper.Map(source, destination); |
|||
|
|||
// Assert: After mapping, they should have different references
|
|||
// This is the key fix: when ExtraProperties references are the same,
|
|||
// a new dictionary should be created for the destination
|
|||
ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeFalse(); |
|||
|
|||
// But content should be preserved
|
|||
destination.ExtraProperties["TestProperty"].ShouldBe("TestValue"); |
|||
destination.ExtraProperties["NumberProperty"].ShouldBe(42); |
|||
destination.ExtraProperties.Count.ShouldBe(source.ExtraProperties.Count); |
|||
} |
|||
|
|||
[Fact] |
|||
public void Should_Not_Create_New_Dictionary_When_Different_References() |
|||
{ |
|||
// Arrange: Create source and destination with different ExtraProperties references
|
|||
var source = new TestEntityWithExtraProperties |
|||
{ |
|||
Id = Guid.NewGuid(), |
|||
Name = "Source Entity" |
|||
}; |
|||
source.SetProperty("SourceProperty", "SourceValue"); |
|||
|
|||
var destination = new TestEntityDtoWithExtraProperties |
|||
{ |
|||
Id = Guid.NewGuid(), |
|||
Name = "Destination DTO" |
|||
}; |
|||
destination.SetProperty("DestinationProperty", "DestinationValue"); |
|||
|
|||
var originalSourceReference = source.ExtraProperties; |
|||
|
|||
// Verify they have different references before mapping
|
|||
ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeFalse(); |
|||
|
|||
// Act: Perform mapping
|
|||
_objectMapper.Map(source, destination); |
|||
|
|||
// Assert: Source reference should remain unchanged
|
|||
ReferenceEquals(source.ExtraProperties, originalSourceReference).ShouldBeTrue(); |
|||
|
|||
// Destination reference may change due to normal mapping process, but should not be same as source
|
|||
ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeFalse(); |
|||
|
|||
destination.ExtraProperties["SourceProperty"].ShouldBe("SourceValue"); |
|||
destination.ExtraProperties["DestinationProperty"].ShouldBe("DestinationValue"); |
|||
} |
|||
|
|||
[Fact] |
|||
public void Should_Handle_Readonly_ExtraProperties_Gracefully() |
|||
{ |
|||
// Arrange: Create entities with readonly ExtraProperties
|
|||
var source = new TestEntityWithReadonlyExtraProperties |
|||
{ |
|||
Id = Guid.NewGuid(), |
|||
Name = "Source Entity" |
|||
}; |
|||
source.ExtraProperties.Add("TestProperty", "TestValue"); |
|||
|
|||
var destination = new TestEntityWithReadonlyExtraProperties |
|||
{ |
|||
Id = Guid.NewGuid(), |
|||
Name = "Destination Entity" |
|||
}; |
|||
|
|||
// Make them reference the same ExtraProperties
|
|||
var sharedExtraProperties = new ExtraPropertyDictionary |
|||
{ |
|||
{"SharedProperty", "SharedValue"} |
|||
}; |
|||
SetReadonlyExtraPropertiesReference(source, sharedExtraProperties); |
|||
SetReadonlyExtraPropertiesReference(destination, sharedExtraProperties); |
|||
|
|||
// Verify they have the same reference
|
|||
ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeTrue(); |
|||
|
|||
// Act & Assert: Should not throw exception even if setter is not available
|
|||
Should.NotThrow(() => _objectMapper.Map(source, destination)); |
|||
} |
|||
|
|||
private static void SetExtraPropertiesReference(TestEntityWithExtraProperties entity, ExtraPropertyDictionary extraProperties) |
|||
{ |
|||
// Use reflection to set the protected setter from ExtensibleObject
|
|||
var propertyInfo = typeof(ExtensibleObject).GetProperty(nameof(ExtensibleObject.ExtraProperties)); |
|||
propertyInfo?.SetValue(entity, extraProperties); |
|||
} |
|||
|
|||
private static void SetExtraPropertiesReference(TestEntityDtoWithExtraProperties entity, ExtraPropertyDictionary extraProperties) |
|||
{ |
|||
// Use reflection to set the protected setter from ExtensibleObject
|
|||
var propertyInfo = typeof(ExtensibleObject).GetProperty(nameof(ExtensibleObject.ExtraProperties)); |
|||
propertyInfo?.SetValue(entity, extraProperties); |
|||
} |
|||
|
|||
private static void SetReadonlyExtraPropertiesReference(TestEntityWithReadonlyExtraProperties entity, ExtraPropertyDictionary extraProperties) |
|||
{ |
|||
// Use reflection to set the private field
|
|||
var fieldInfo = typeof(TestEntityWithReadonlyExtraProperties).GetField("_extraProperties", |
|||
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); |
|||
fieldInfo?.SetValue(entity, extraProperties); |
|||
} |
|||
} |
|||
|
|||
@ -1,17 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
|
|||
namespace Volo.Abp.BackgroundJobs; |
|||
|
|||
public class BackgroundJobsDomainAutoMapperProfile : Profile |
|||
{ |
|||
public BackgroundJobsDomainAutoMapperProfile() |
|||
{ |
|||
CreateMap<BackgroundJobInfo, BackgroundJobRecord>() |
|||
.ConstructUsing(x => new BackgroundJobRecord(x.Id)) |
|||
.Ignore(record => record.ConcurrencyStamp) |
|||
.Ignore(record => record.ExtraProperties); |
|||
|
|||
CreateMap<BackgroundJobRecord, BackgroundJobInfo>(); |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
|
|||
namespace Volo.Abp.BackgroundJobs; |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BackgroundJobInfoToBackgroundJobRecordMapper |
|||
: MapperBase<BackgroundJobInfo, BackgroundJobRecord> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(BackgroundJobRecord.ConcurrencyStamp))] |
|||
[MapperIgnoreTarget(nameof(BackgroundJobRecord.ExtraProperties))] |
|||
public override partial BackgroundJobRecord Map(BackgroundJobInfo source); |
|||
|
|||
[MapperIgnoreTarget(nameof(BackgroundJobRecord.ConcurrencyStamp))] |
|||
[MapperIgnoreTarget(nameof(BackgroundJobRecord.ExtraProperties))] |
|||
public override partial void Map(BackgroundJobInfo source, BackgroundJobRecord destination); |
|||
|
|||
[ObjectFactory] |
|||
protected BackgroundJobRecord CreateBackgroundJobRecord(BackgroundJobInfo source) |
|||
{ |
|||
return new BackgroundJobRecord(source.Id); |
|||
} |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BackgroundJobRecordToBackgroundJobInfoMapper |
|||
: MapperBase<BackgroundJobRecord, BackgroundJobInfo> |
|||
{ |
|||
public override partial BackgroundJobInfo Map(BackgroundJobRecord source); |
|||
|
|||
public override partial void Map(BackgroundJobRecord source, BackgroundJobInfo destination); |
|||
} |
|||
@ -0,0 +1 @@ |
|||
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); |
|||
@ -1,15 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Blogging.Admin.Blogs; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Blogs.Dtos; |
|||
|
|||
namespace Volo.Blogging.Admin |
|||
{ |
|||
public class BloggingAdminApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public BloggingAdminApplicationAutoMapperProfile() |
|||
{ |
|||
CreateMap<Blog, BlogDto>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Blogs.Dtos; |
|||
|
|||
namespace Volo.Blogging.Admin; |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BlogToBlogDtoMapper : MapperBase<Blog, BlogDto> |
|||
{ |
|||
public override partial BlogDto Map(Blog source); |
|||
|
|||
public override partial void Map(Blog source, BlogDto destination); |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Blogging.Admin.Blogs; |
|||
using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Blogs.Dtos; |
|||
using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel; |
|||
|
|||
namespace Volo.Blogging.Admin |
|||
{ |
|||
public class AbpBloggingAdminWebAutoMapperProfile : Profile |
|||
{ |
|||
public AbpBloggingAdminWebAutoMapperProfile() |
|||
{ |
|||
CreateMap<CreateModel.BlogCreateModalView, CreateBlogDto>(); |
|||
CreateMap<BlogDto, EditModel.BlogEditViewModel>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Blogging.Admin.Blogs; |
|||
using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs; |
|||
using Volo.Blogging.Blogs.Dtos; |
|||
using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel; |
|||
|
|||
namespace Volo.Blogging.Admin; |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BlogDtoToBlogEditViewModelMapper : MapperBase<BlogDto, EditModel.BlogEditViewModel> |
|||
{ |
|||
public override partial EditModel.BlogEditViewModel Map(BlogDto source); |
|||
|
|||
public override partial void Map(BlogDto source, EditModel.BlogEditViewModel destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BlogCreateModalViewToCreateBlogDtoMapper : MapperBase<CreateModel.BlogCreateModalView, CreateBlogDto> |
|||
{ |
|||
public override partial CreateBlogDto Map(CreateModel.BlogCreateModalView source); |
|||
|
|||
public override partial void Map(CreateModel.BlogCreateModalView source, CreateBlogDto destination); |
|||
} |
|||
@ -1,33 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Blogs.Dtos; |
|||
using Volo.Blogging.Comments; |
|||
using Volo.Blogging.Comments.Dtos; |
|||
using Volo.Blogging.Posts; |
|||
using Volo.Blogging.Tagging; |
|||
using Volo.Blogging.Tagging.Dtos; |
|||
using Volo.Blogging.Users; |
|||
|
|||
namespace Volo.Blogging |
|||
{ |
|||
public class BloggingApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public BloggingApplicationAutoMapperProfile() |
|||
{ |
|||
CreateMap<Blog, BlogDto>(); |
|||
CreateMap<BlogUser, BlogUserDto>(); |
|||
CreateMap<Post, PostWithDetailsDto>().Ignore(x=>x.Writer).Ignore(x=>x.CommentCount).Ignore(x=>x.Tags); |
|||
CreateMap<Comment, CommentWithDetailsDto>().Ignore(x => x.Writer); |
|||
CreateMap<Tag, TagDto>(); |
|||
CreateMap<Post, PostCacheItem>().Ignore(x=>x.CommentCount).Ignore(x=>x.Tags); |
|||
CreateMap<PostCacheItem, PostWithDetailsDto>() |
|||
.IgnoreModificationAuditedObjectProperties() |
|||
.IgnoreDeletionAuditedObjectProperties() |
|||
.Ignore(x => x.ConcurrencyStamp) |
|||
.Ignore(x => x.Writer) |
|||
.Ignore(x => x.CommentCount) |
|||
.Ignore(x => x.Tags); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Blogs.Dtos; |
|||
using Volo.Blogging.Comments; |
|||
using Volo.Blogging.Comments.Dtos; |
|||
using Volo.Blogging.Posts; |
|||
using Volo.Blogging.Tagging; |
|||
using Volo.Blogging.Tagging.Dtos; |
|||
using Volo.Blogging.Users; |
|||
|
|||
namespace Volo.Blogging; |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class PostCacheItemToPostWithDetailsDtoMapper : MapperBase<PostCacheItem, PostWithDetailsDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModificationTime))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModifierId))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.IsDeleted))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.DeletionTime))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.DeleterId))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.ConcurrencyStamp))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] |
|||
public override partial PostWithDetailsDto Map(PostCacheItem source); |
|||
|
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModificationTime))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModifierId))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.IsDeleted))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.DeletionTime))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.DeleterId))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.ConcurrencyStamp))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] |
|||
public override partial void Map(PostCacheItem source, PostWithDetailsDto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class PostToPostCacheItemMapper : MapperBase<Post, PostCacheItem> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(PostCacheItem.CommentCount))] |
|||
[MapperIgnoreTarget(nameof(PostCacheItem.Tags))] |
|||
public override partial PostCacheItem Map(Post source); |
|||
|
|||
[MapperIgnoreTarget(nameof(PostCacheItem.CommentCount))] |
|||
[MapperIgnoreTarget(nameof(PostCacheItem.Tags))] |
|||
public override partial void Map(Post source, PostCacheItem destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class CommentToCommentWithDetailsDtoMapper : MapperBase<Comment, CommentWithDetailsDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(CommentWithDetailsDto.Writer))] |
|||
public override partial CommentWithDetailsDto Map(Comment source); |
|||
|
|||
[MapperIgnoreTarget(nameof(CommentWithDetailsDto.Writer))] |
|||
public override partial void Map(Comment source, CommentWithDetailsDto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class PostToPostWithDetailsDtoMapper : MapperBase<Post, PostWithDetailsDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] |
|||
public override partial PostWithDetailsDto Map(Post source); |
|||
|
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] |
|||
[MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] |
|||
public override partial void Map(Post source, PostWithDetailsDto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class TagToTagDtoMapper : MapperBase<Tag, TagDto> |
|||
{ |
|||
public override partial TagDto Map(Tag source); |
|||
|
|||
public override partial void Map(Tag source, TagDto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BlogUserToBlogUserDtoMapper : MapperBase<BlogUser, BlogUserDto> |
|||
{ |
|||
public override partial BlogUserDto Map(BlogUser source); |
|||
|
|||
public override partial void Map(BlogUser source, BlogUserDto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BlogToBlogDtoMapper : MapperBase<Blog, BlogDto> |
|||
{ |
|||
public override partial BlogDto Map(Blog source); |
|||
|
|||
public override partial void Map(Blog source, BlogDto destination); |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Comments; |
|||
using Volo.Blogging.Posts; |
|||
using Volo.Blogging.Tagging; |
|||
|
|||
namespace Volo.Blogging; |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class TagToTagEtoMapper : MapperBase<Tag, TagEto> |
|||
{ |
|||
public override partial TagEto Map(Tag source); |
|||
|
|||
public override partial void Map(Tag source, TagEto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class PostToPostEtoMapper : MapperBase<Post, PostEto> |
|||
{ |
|||
public override partial PostEto Map(Post source); |
|||
|
|||
public override partial void Map(Post source, PostEto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class CommentToCommentEtoMapper : MapperBase<Comment, CommentEto> |
|||
{ |
|||
public override partial CommentEto Map(Comment source); |
|||
|
|||
public override partial void Map(Comment source, CommentEto destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class BlogToBlogEtoMapper : MapperBase<Blog, BlogEto> |
|||
{ |
|||
public override partial BlogEto Map(Blog source); |
|||
|
|||
public override partial void Map(Blog source, BlogEto destination); |
|||
} |
|||
@ -1,19 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Blogging.Blogs; |
|||
using Volo.Blogging.Comments; |
|||
using Volo.Blogging.Posts; |
|||
using Volo.Blogging.Tagging; |
|||
|
|||
namespace Volo.Blogging |
|||
{ |
|||
public class BloggingDomainMappingProfile : Profile |
|||
{ |
|||
public BloggingDomainMappingProfile() |
|||
{ |
|||
CreateMap<Blog, BlogEto>(); |
|||
CreateMap<Comment, CommentEto>(); |
|||
CreateMap<Post, PostEto>(); |
|||
CreateMap<Tag, TagEto>(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Blogging.Pages.Blogs.Posts; |
|||
using Volo.Blogging.Posts; |
|||
|
|||
namespace Volo.Blogging |
|||
{ |
|||
public class AbpBloggingWebAutoMapperProfile : Profile |
|||
{ |
|||
public AbpBloggingWebAutoMapperProfile() |
|||
{ |
|||
CreateMap<PostWithDetailsDto, EditPostViewModel>().Ignore(x=>x.Tags); |
|||
CreateMap<NewModel.CreatePostViewModel, CreatePostDto>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Blogging.Pages.Blogs.Posts; |
|||
using Volo.Blogging.Posts; |
|||
|
|||
namespace Volo.Blogging; |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class PostWithDetailsDtoToEditPostViewModelMapper : MapperBase<PostWithDetailsDto, EditPostViewModel> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(EditPostViewModel.Tags))] |
|||
public override partial EditPostViewModel Map(PostWithDetailsDto source); |
|||
|
|||
[MapperIgnoreTarget(nameof(EditPostViewModel.Tags))] |
|||
public override partial void Map(PostWithDetailsDto source, EditPostViewModel destination); |
|||
} |
|||
|
|||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] |
|||
public partial class CreatePostViewModelToCreatePostDtoMapper : MapperBase<NewModel.CreatePostViewModel, CreatePostDto> |
|||
{ |
|||
public override partial CreatePostDto Map(NewModel.CreatePostViewModel source); |
|||
|
|||
public override partial void Map(NewModel.CreatePostViewModel source, CreatePostDto destination); |
|||
} |
|||