#AngularReactiveForms #AngularForms #ReactiveFormsTutorial #AngularTutorial #AngularFormsPart1 #AngularFormValidation #AngularFormSubmissions #DynamicForms #InteractiveForms #AngularDevelopment #FrontendDevelopment #WebDevelopment
Unlocking the World of Programming: Essential Tips, Tools, and Techniques @CodePlay
Saturday, May 20, 2023
Mastering Angular Reactive Forms: Part 1 - Building Dynamic and Interactive Forms
Monday, May 15, 2023
Sql tutorial final part 1 in hindi #sql #sqltutorials
https://www.youtube.com/channel/UC_X3n9JVuK36F4ADJBajM9A/join
Wednesday, May 3, 2023
EXCEPTION HANDLING IN SQL ?
Select *from EMPLOYEES
--CREATE TABLE TEST
--(
-- ID INT,
-- [NAME] NVARCHAR(10)
--)
SELECT ID,[NAME] FROM TEST
INSERT INTO TEST([NAME],ID) VALUES('SHYAM',88)
--Using Distinct Keyword to select Unique records
SELECT DISTINCT ID,[NAME] FROM TEST
--select records using where clause
SELECT ID,[NAME] FROM TEST WHERE ID=20
--select records using where AND/OR Clause
SELECT ID,[NAME] FROM TEST WHERE ID=20 AND [NAME]='RAM' OR [NAME]='SHYAM'
--select records using where IN Clause
SELECT ID,[NAME] FROM TEST WHERE [NAME] IN ('RAM','SHYAM')
--select records using where BETWEEN Clause
SELECT ID,[NAME] FROM TEST WHERE ID BETWEEN 55 AND 99
--select records using where LIKE Clause
SELECT ID,[NAME] FROM TEST WHERE [NAME] LIKE '%YAM%'
--select records using Order BY Clause
SELECT ID,[NAME] FROM TEST ORDER BY 2 DESC
--select records using Group BY Clause
SELECT SUM(ID) ID,[NAME] FROM TEST GROUP BY [NAME]
--select records using Count Clause
SELECT COUNT(ID) ID FROM TEST
--select records using MAX Clause
SELECT MAX(ID) ID FROM TEST
--select records using Having Clause
SELECT ID FROM TEST GROUP BY ID HAVING MAX(ID)>20
CREATE INDEX INDEX_TEST_ID
ON TEST(ID)
ALTER TABLE TEST
DROP INDEX INDEX_TEST_ID ON TEST --- DROP INDEX FROM TABLE
--------EXCEPTION HANDLING-----------
BEGIN TRY
SELECT *FROM TEST
DECLARE @A INT = 1;
DECLARE @B INT = 0;
DECLARE @C INT = 0;
SET @C = @A/@B;
END TRY
BEGIN CATCH
PRINT 'CATCH'
END CATCH
Tuesday, May 2, 2023
SQL Statements?
--SELECT,INSERT,UPDATE,DELETE,ALTER,DROP,TRUNCATE,CREATE,USE,SHOW
--USE [LiveSession]
--SELECT *FROM EMPLOYEES
--SELECT *FROM EMPLOYEESALARY
--INSERT INTO EMPLOYEES([NAME],ID,IsActive,AGE) VALUES('HELLO',5,0,60)
--UPDATE EMPLOYEES SET [NAME] = 'ABC',AGE=1 WHERE ID=5
--DELETE EMPLOYEES WHERE ID=5
--DELETE EMPLOYEESALARY
--ALTER TABLE EMPLOYEESALARY ADD T INT
--ALTER TABLE EMPLOYEESALARY ALTER COLUMN T BIT -- ALT+F1
--TRUNCATE VS DROP VS DELETE
TRUNCATE TABLE EMPLOYEESALARY -- IDENTITY(1,1)
DROP TABLE EMPLOYEESALARY
Friday, April 28, 2023
Sql Constraints? #sql
1. DEFAULT Constraint: Provides a default value for a column when none is specified.
2. UNIQUE Constraint: Ensures that all the values in a column are different.
3. PRIMARY Key: Uniquely identifies each row/record in a database table.
4. FOREIGN Key: Uniquely identifies a row/record in any another database table.
5. CHECK Constraint: The CHECK constraint ensures that all values in a column satisfy
certain conditions.
6. INDEX: Used to create and retrieve data from the database very quickly.
7. NOT NULL Constraint: Ensures that a column cannot have a NULL value.
CREATE TABLE EMPLOYEES
(
[Name] VARCHAR(50) PRIMARY KEY,
ID INT NOT NULL,
IsActive BIT DEFAULT(1),
AGE INT UNIQUE
)
SELECT ID,IsActive,AGE,[Name] FROM EMPLOYEES
INSERT INTO EMPLOYEES(ID,[Name],AGE) VALUES(1,'Mohit17',40)
INSERT INTO EMPLOYEESALARY(SALARY,NAME_PR) VALUES(100000,'Mohit1722')
Select *from EMPLOYEESALARY
--CREATE TABLE EMPLOYEESALARY
--(
-- SALARY INT NOT NULL,
-- NAME_PR VARCHAR(50) FOREIGN KEY REFERENCES EMPLOYEES([Name])
--)
CREATE TABLE EmployeeAddress
(
AGE INT NOT NULL CHECK(AGE >=18)
)
SELECT *from EmployeeAddress
INSERT INTO EmployeeAddress(AGE) VALUES(18)
CREATE INDEX INDEX_AGE
ON EmployeeAddress(AGE)
What is An Assembly ? #assembly #csharp
An Assembly is a basic building block of .Net Framework applications. It is basically a compiled code that can be executed by the CLR. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An Assembly can be a DLL or exe depending upon the project that we choose.
- Private Assembly
- Shared Assembly








Thursday, April 27, 2023
Types of inheritance in Entity Framework #TPH # TPT #TPC #ENTITY #ENTITYFRAMEWORK
#TPH # TPT #TPC #ENTITY #ENTITYFRAMEWORK
Table-per-Hierarchy (TPH)
The TPH inheritance states that all entities, in a hierarchy of entities, are mapped to a single table in storage schema. It means, there is only one table in database and different Entity types in Entity model that inherits from a base Entity are mapped to that table.

C# Implementation Code for TPH
public class Course { [Key] public int CourseId { get; set; } public string Name { get; set; } public string Details { get; set; } public string Trainer { get; set; } } public class OnlineCourse : Course { public string URL { get; set; } } public class OfflineCourse : Course { public string Address { get; set; } }Entity Framework Code First Mapping for TPH
modelBuilder.Entity<Course>() .Map<OnlineCourse >(m => m.Requires("Type").HasValue("OnlineCourse ")) .Map<OfflineCourse >(m => m.Requires("Type").HasValue("OfflineCourse "));Table-per-Concrete-Type (TPC)
The TPC inheritance states that each concrete class (a class which can be instantiated) in the hierarchy of entities is mapped to a separate table in storage schema. It means, there is separate table in database to maintain data for each derived entity type.

C# Implementation Code for TPC
public abstract class Course //abstract class { [Key] public int CourseId { get; set; } public string Name { get; set; } public string Details { get; set; } public string Trainer { get; set; } } public class OnlineCourse : Course //concrete class { public string URL { get; set; } } public class OfflineCourse : Course //concrete class { public string Address { get; set; } }Entity Framework Code First Mapping for TPC
modelBuilder.Entity<OnlineCourse >().Map(m => { m.MapInheritedProperties(); m.ToTable("OnlineCourse "); }); modelBuilder.Entity<OfflineCourse >().Map(m => { m.MapInheritedProperties(); m.ToTable("OfflineCourse "); });Note
The TPC inheritance is commonly used to inherit basic features.
Table-per-Type (TPT)
The TPT inheritance states that each entity in the hierarchy of entities is mapped to a separate table in storage schema. It means, there is separate table in database to maintain data for each Entity Type.

C# Implementation Code for TPT
public class Course { [Key] public int CourseId { get; set; } public string Name { get; set; } public string Details { get; set; } public string Trainer { get; set; } } public class OnlineCourse : Course { public string URL { get; set; } } public class OfflineCourse : Course { public string Address { get; set; } }Entity Framework Code First Mapping for TPT
modelBuilder.Entity<Course>().ToTable("Course"); modelBuilder.Entity<OnlineCourse >().ToTable("OnlineCourse "); modelBuilder.Entity<OfflineCourse >().ToTable("OfflineCourse ");
Mastering Angular Reactive Forms: Part 1 - Building Dynamic and Interactive Forms
#AngularReactiveForms #AngularForms #ReactiveFormsTutorial #AngularTutorial #AngularFormsPart1 #AngularFormValidation #AngularFormSu...