Write in app.component.ts file:
import
{ environment } from
'../environments/environment.prod';
ngOnInit()
{
if (!isDevMode()
&& environment.production)
{
if (location.protocol
=== 'http:') {
window.location.href
= location.href.replace('http',
'https');
}
}
}
Write your environment.prod.ts file like:
export const environment = {
production: true
};...
Monday, March 19, 2018
Manage Audit using DbContext in Entity Framework 6
By Vimal Vataliya
1:44 AM
Audit,
Audit in entity framework,
Track changes in entity framework
Leave a Comment
Create table in sql server (AuditMaster):
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [AuditMaster](
[AuditId] [int] IDENTITY(1,1) NOT NULL,
[TableName] [nvarchar](100) NOT NULL, -- for table name
[PrimaryKeyValues] [nvarchar](100) NOT NULL, -- for identity value of affected table
[Description] [nvarchar](max) NOT NULL, -- store one string
here for...