اشتراک‌ها
کتابخانه ای برای ایجاد Interception در EF به زبان ساده تر
public class AuditInterceptor : Interceptor<IAuditEntity>
{
    public override void PreInsert(IContext<IAuditEntity> context)
    {
        context.Entity.CreatedAt = DateTime.UtcNow;
        context.Entity.ModifiedAt = DateTime.UtcNow;
    }

    public override void PreUpdate(IContext<IAuditEntity> context)
    {
        context.Entity.ModifiedAt = DateTime.UtcNow;
    }
}

public class MyDbContext : InterceptionDbContext
{
    public MyDbContext()
    {
        AddInterceptor(new AuditInterceptor());
    }
}
کتابخانه ای برای ایجاد Interception در EF به زبان ساده تر
نظرات مطالب
EF Code First #3
شما خصوصیتی به نام FK_User_Id  در مدل مورد نظر دارید؟ دقیقا باید نام خصوصیت را مشخص کنید. یعنی اگر خصوصیت مورد نظر UserId هست، باید نام آن را قید کنید؛ نه نام دیگری.
با این حال به صورت قراردادی روش زیر جواب میدهد برای دسترسی به کلید خارجی و نیازی به معرفی صریح ندارید:
public calss Test
{
   public User User {get;set;}
   public int UserId {get;set;}
}

public class User
{
 public int Id {get;set;}
 //some properties
}

بازخوردهای دوره
تهیه کوئری بر روی ایندکس‌های Full Text Search
من از دستور ISABOUT  مربوط به CONTAINSTABLE استفاده میکنم مشکلی که دارم اینکه رکوردی در دیتابیس دارم با مقدار "آموزش دیجیتال" سرچی که انجام میدم به شکل زیر ولی نمیدونم چرا خروجی rank  مقدار null  برمیگردونه 
SELECT *
FROM News 
LEFT OUTER JOIN
    CONTAINSTABLE(news, title, N'ISABOUT("آموزش or دیجیتال" weight(0.9))') AS CT_title 
        ON News.ID = CT_title.[KEY]

در صورتی که اگر به جای or  دستور ISABOUT از کاراکتر space  استفاده کنم خروجی درست میشه ولی من باید خروجی رو به وسیله or  به دست بیارم
اشتراک‌ها
سری آموزش توسعه‌ی وب از تیم کروم

Learn web development
Explore our growing collection of courses on key web design and development subjects. An industry expert has written each course, helped by members of the Chrome team. Follow the modules sequentially, or dip into the topics you most want to learn about. 

سری آموزش توسعه‌ی وب از تیم کروم
اشتراک‌ها
TypeScript 4.1 منتشر شد

For this release, we have some exciting new features, new checking flags, editor productivity updates, and speed improvements. Let’s get a look at what 4.1 brings!

TypeScript 4.1 منتشر شد
اشتراک‌ها
SQL Server Management Studio 18.7 منتشر شد

The 18.7 release is the third major release of SSMS in 2020 and expands on our commitment to providing quality tooling for database administration. Key changes include:

  • Fix for Database diagrams add table dialog.
  • Installation of Azure Data Studio.
  • Extended Events script with wait type name. 
SQL Server Management Studio 18.7 منتشر شد
اشتراک‌ها
npm 7.0 منتشر شد

With millions of users, resulting in 75 billion package downloads per month, npm has undoubtedly been a huge success and npm 7 is now here (and will also come with Node.js 15.0 next week). Key features include workspaces, installation of peer dependencies, and support for yarn.lock. 

npm 7.0 منتشر شد
اشتراک‌ها
TypeScript 4.1 Beta منتشر شد

Let’s get a look at what 4.1 has in store for us!
- Template Literal Types
- Key Remapping in Mapped Types
- Recursive Conditional Types
- --noUncheckedIndexedAccess
- paths without baseUrl
- checkJs Implies allowJs
- React 17 JSX Factories
- Editor Support for the JSDoc @see Tag
- Breaking Changes 

TypeScript 4.1 Beta منتشر شد
اشتراک‌ها
SQL Server Management Studio 18.6 منتشر شد

The 18.6 release is the  second  major release of SSMS in 2020  and packs  several high  impact   changes , including a fix for  crashes in database diagram s.  Key fixes include:    

  • Save to XEL file error fix.  
  • B acpac  file  import  error fix.  
  • Database diagrams crash fix.  
  • Addressed sources o f three common application hangs.  
SQL Server Management Studio 18.6 منتشر شد
اشتراک‌ها
ارائه‌ی یک reverse-proxy سورس باز از مایکروسافت

YARP is a reverse proxy toolkit for building fast proxy servers in .NET using the infrastructure from ASP.NET and .NET. The key differentiator for YARP is that it's been designed to be easily customized and tweaked to match the specific needs of each deployment scenario. 

ارائه‌ی یک reverse-proxy سورس باز از مایکروسافت