Skip to content

Instantly share code, notes, and snippets.

View alaawahbah's full-sized avatar

Alaa Wahbah alaawahbah

View GitHub Profile
WITH employeeMaster
AS ( SELECT lp.id ,
lp.ParentId ,
ltp.NAME
FROM Locations lp inner join LocationTranslations ltp on ltp.Language='ar-SY' and lp.Id=ltp.CoreId
WHERE ltp.NAME like '%دم%'
UNION ALL
SELECT lc.id ,
DBCC CHECKIDENT ('[TestTable]', RESEED, 0);
GO
[RegularExpression(@"^(?!0*(\.0+)?$)(\d+|\d*\.\d+)$", ErrorMessage = "RobotId shouldn't be Zero")]
https://www.techiediaries.com/angular-electron/
https://github.com/maximegris/angular-electron
<?xml version='1.0' encoding='utf-8'?>
<widget id="uk.co.workingedge.phonegap.plugins.example.diagnostic.android.runtime.example" version="0.0.1"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Cordova Diagnostic Plugin Android Runtime Example</name>
<description>
Demonstrates use of Cordova Diagnostic Plugin for requesting Android runtime permissions in Android 6.0/API 23 and above.
</description>
<author email="dave@workingedge.co.uk" href="http://www.workingedge.co.uk/dave">
using INTDV.BASECLASSES.Shared;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace BaseRepository
using INTDV.BASECLASSES.BaseRepository;
using INTDV.BASECLASSES.Shared;
using INTDV.COMMUNICO.BACKEND.Core.Entities;
using INTDV.COMMUNICO.BACKEND.Core.Filters;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
truncate table [dbo].[AbpAuditLogs]
truncate table [dbo].[AbpEntityPropertyChanges]
DELETE FROM [dbo].[AbpEntityChangeSets]
DBCC CHECKIDENT ('OTCDB.dbo.AbpEntityChangeSets',RESEED, 0)
DELETE FROM [dbo].[AbpEntityChanges]
DBCC CHECKIDENT ('OTCDB.dbo.AbpEntityChanges',RESEED, 0)
DELETE FROM [dbo].[AbpTenantNotifications]
SELECT p.Name as PermissionName, (STUFF( (select ',' + r.Name from Roles r where r.id in (select RoleId from RolePermissions rp where rp.RoleId =r.Id and rp.PermissionId = p.Id )
FOR XML PATH('')),
1, 1, '')) AS RoleName
FROM Permissions p
-------------------------------------------------
DECLARE @CodeNameString varchar(100)
SELECT
@CodeNameString = STUFF( (select ',' + r.Name from Roles r where r.id in (select RoleId from RolePermissions rp where rp.RoleId =r.Id and rp.PermissionId = p.Id )
FOR XML PATH('')),
Recover Deleted Data From SQL Server Table by Transaction Logs
There are some prerequisites to be fulfilled before we start the process to recover deleted data from SQL table. To easily recover deleted rows from a table in SQL Server database, it must have the BULK-LOGGED or FULL recovery model at the time when the deletion first occurred. Some quick actions are required so that the logs are still available to perform the recovery of data.
Follow the steps given below to recover deleted data from SQL Server 2005, 2008, 2012, 2014, and 2016 by the use of transaction logs.
Step 1
Check the number of rows present in the table from which the data has been accidentally deleted using the below-mentioned query:
1
SELECT * FROM Table_name