This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF OBJECT_ID('tempdb..#NumbersArray') IS NOT NULL | |
DROP TABLE #NumbersArray | |
GO | |
--Create T-SQL version of number array look-like | |
CREATE TABLE #NumbersArray | |
( | |
ArrayIndex Int PRIMARY KEY CLUSTERED, | |
Value Int | |
) | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE MyDB | |
Go | |
if exists (select 1 | |
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') | |
where r.fkeyid = object_id('"Order"') and o.name = 'FK_ORDER_REFERENCE_CUSTOMER') | |
alter table "Order" | |
drop constraint FK_ORDER_REFERENCE_CUSTOMER | |
go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE MyDB | |
GO | |
SET IDENTITY_INSERT Customer ON | |
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(1,'Maria','Anders','Berlin','Germany','030-0074321') | |
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(2,'Ana','Trujillo','México D.F.','Mexico','(5) 555-4729') | |
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(3,'Antonio','Moreno','México D.F.','Mexico','(5) 555-3932') | |
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(4,'Thomas','Hardy','London','UK','(171) 555-7788') | |
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(5,'Christina','Berglund','Luleå','Sweden','0921-12 34 65') | |
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(6,'Hanna','Moos','Mannheim','Germany','0621-08460') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE MyDB | |
Go | |
CREATE PROCEDURE [dbo].[usp_GetSuppliers] | |
AS | |
BEGIN | |
--Declare Local Variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [MyDB] | |
GO | |
CREATE PROCEDURE [dbo].[usp_GetOrders] | |
AS | |
BEGIN | |
--Declare Local Variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [MyDB] | |
GO | |
CREATE PROCEDURE [dbo].[usp_GetOrderItems] | |
AS | |
BEGIN | |
--Declare Local Variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [MyDB] | |
GO | |
CREATE PROCEDURE [dbo].[usp_GetCustomers] | |
AS | |
BEGIN | |
--Declare Local Variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Angular6Mvc5.Models | |
{ | |
public class Supplier | |
{ | |
public int Id { get; set; } | |
public string CompanyName { get; set; } | |
public string ContactName { get; set; } | |
public string ContactTitle { get; set; } | |
public string City { get; set; } | |
public string Country { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Angular6Mvc5.Models | |
{ | |
public class Customer | |
{ | |
public int Id { get; set; } | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
public string City { get; set; } | |
public string Country { get; set; } | |
public string Phone { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Angular6Mvc5.Models | |
{ | |
public class Order | |
{ | |
public int Id { get; set; } | |
public DateTime OrderDate { get; set; } | |
public int OrderNumber { get; set; } | |
public int CustomerId { get; set; } | |
public double TotalAmount { get; set; } |
OlderNewer