Entity Framework half-heartedly supported Domain-Driven Design patterns. But the new-from-scratch EF Core has brought new hope for developers to map your well-designed domain classes to a database, reducing the cases where a separate data model is needed. EF Core 2.1 is very DDD friendly, even supporting things like fully encapsulated collections, backing fields and the return of support for value objects. In this session, we'll review some well-designed aggregates and explore how far EF Core 2.1 goes to act as the mapper between your domain classes and your data store.
EF Code First #3
public class Post : BaseEntity { public new int Id { get; set; } public virtual ICollection<Comment.Comment> Comments { get; set; } [NotMapped] public int CommentsCount { get { if (Comments == null || !Comments.Any()) return 0; return Comments.Count; } } public Post() { Comments = new List<Comment.Comment>(); } }
var post = _tEntities.Include(p => p.User).Include(p => p.Comments) .Select(p => new PostListViewModels { Id = p.Id, Username = p.Username, CommentCount = p.CommentsCount });
The specified type member 'CommentsCount' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
انتشار WinJS 4.0
.NET Core + Angular Dashboard
Topics Covered:
- Building a dashboard application in Angular
- Building a Web API in .NET Core 2.0
- Using Chart.js to build stunning charts of different types
- Making HTTP requests using Angular to query a Web API
- Using Postman to send requests
- Working with Observables
- Using Input and Output decorators in Angular
- Using PostgreSQL and pgAdmin
- Automatically seeding a database with large amounts of sample data
- Styling an application using custom CSS and Bootstrap 4
- Using Map, Filter, and Reduce in Javascript
- Creating Routes in Angular
- Get, Put, Post, Patch Web API Controller Action request types
- Configuring your API for CORS
NET MAUI. چیست؟
HTTP Logging is a middleware that logs information about HTTP requests and HTTP responses. HTTP logging provides logs of
HTTP request information
Common properties
Headers
Body
HTTP response information
HTTP Logging is valuable in several scenarios to
Record information about incoming requests and responses
Filter which parts of the request and response are logged
Filtering which headers to log
Here’s a summary of what’s new in this preview release:
- ASP.NET Core support for native AOT
- Server-side rendering with Blazor
- Render Razor components outside of ASP.NET Core
- Sections support in Blazor
- Monitor Blazor Server circuit activity
- SIMD enabled by default for Blazor WebAssembly apps
- Request timeouts
- Short circuit routes