├── 02 - [Entity Framework Core]
├── [Entity Framework Core - Exams]
│ ├── txt.txt
│ ├── 07 - [C# DB Advanced Exam - 10 December 2017]
│ │ ├── FastFood.Models
│ │ │ ├── Enums
│ │ │ │ └── OrderType.cs
│ │ │ └── FastFood.Models.csproj
│ │ ├── FastFood.Data
│ │ │ └── Configuration.cs
│ │ ├── 01. Model Definition_Datasets.zip
│ │ ├── 01. Model Definition_Project Skeleton.zip
│ │ ├── 01. Model Definition_Problem Description (2).docx
│ │ └── FastFood.App
│ │ │ └── FastFoodProfile.cs
│ ├── 03 - [C# DB Advanced Exam - 08 August 2020]
│ │ ├── VaporStore
│ │ │ ├── Data
│ │ │ │ ├── Models
│ │ │ │ │ └── Enums
│ │ │ │ │ │ ├── CardType.cs
│ │ │ │ │ │ └── PurchaseType.cs
│ │ │ │ └── Configuration.cs
│ │ │ ├── Datasets
│ │ │ │ └── purchases.xml
│ │ │ └── VaporStoreProfile.cs
│ │ ├── 01. Model Definition_Problem Description.docx
│ │ └── 01. Model Definition_Skeleton + Datasets.zip
│ ├── 01 - [C# DB Advanced Exam - 13 Dec 2019]
│ │ ├── BookShop
│ │ │ ├── Data
│ │ │ │ ├── Models
│ │ │ │ │ └── Enums
│ │ │ │ │ │ └── Genre.cs
│ │ │ │ └── Configuration.cs
│ │ │ └── DataProcessor
│ │ │ │ └── ImportDto
│ │ │ │ └── ImportAuthorBookDto.cs
│ │ ├── 01. Model Defition_Skeleton.zip
│ │ └── 01. Model Defition_Problem Descriptions.docx
│ ├── 09 - [C# DB Advanced Exam - 05 January 2018]
│ │ ├── PetClinic.docx
│ │ ├── PetClinic
│ │ │ ├── Data
│ │ │ │ └── Configuration.cs
│ │ │ ├── App
│ │ │ │ └── PetClinicProfile.cs
│ │ │ ├── DataProcessor
│ │ │ │ └── Dto
│ │ │ │ │ └── Export
│ │ │ │ │ └── ExportProcedureAnimalAidDto.cs
│ │ │ └── Results
│ │ │ │ └── VetsImport.txt
│ │ └── C# DB Advanced Exam - 5 January 2018 - Skeleton.zip
│ ├── 10 - [C# DB Advenced Exam - 05 December 2017]
│ │ ├── Stations.Models
│ │ │ ├── Enums
│ │ │ │ ├── TripStatus.cs
│ │ │ │ ├── TrainType.cs
│ │ │ │ └── CardType.cs
│ │ │ └── Stations.Models.csproj
│ │ ├── Stations.docx
│ │ ├── Stations.Data
│ │ │ └── Configuration.cs
│ │ ├── C# DB Advenced Exam - 5 December 2017 - Skeleton.zip
│ │ ├── Stations.App
│ │ │ ├── ExportResults
│ │ │ │ └── ExpectedExports
│ │ │ │ │ └── CardsTicket.xml
│ │ │ ├── StationsProfile.cs
│ │ │ └── ImportResults
│ │ │ │ └── Classes.txt
│ │ └── Stations.DataProcessor
│ │ │ └── Dto
│ │ │ └── Import
│ │ │ └── ImportTicketCardDto.cs
│ ├── 08 - [C# DB Advanced Exam - 04 December 2017]
│ │ ├── Instagraph.docx
│ │ ├── Instagraph.Models
│ │ │ └── Instagraph.Models.csproj
│ │ ├── Instagraph.App
│ │ │ ├── files
│ │ │ │ └── output
│ │ │ │ │ └── PopularUsers.json
│ │ │ └── InstagraphProfile.cs
│ │ ├── Instagraph.Data
│ │ │ └── Configuration.cs
│ │ ├── C# DB Advanced Exam - 4 December 2017 - Skeleton.zip
│ │ └── Instagraph.DataProcessor
│ │ │ └── DtoModels
│ │ │ ├── Import
│ │ │ └── ImportCommentPostDto.cs
│ │ │ └── Export
│ │ │ └── ExportCommentsDto.cs
│ ├── 05 - [C# DB Advanced Exam - 07 April 2019]
│ │ ├── Cinema
│ │ │ ├── CinemaProfile.zip
│ │ │ ├── Data
│ │ │ │ ├── Configuration.cs
│ │ │ │ └── Models
│ │ │ │ │ └── Enums
│ │ │ │ │ └── Genre.cs
│ │ │ └── CinemaProfile.cs
│ │ ├── 01. Model Definition _Problem Description .docx
│ │ └── 01. Model Definition _Skeleton + Datasets.zip
│ ├── 12 - [C# DB Advanced Retake Exam - 11 Apr 2021]
│ │ ├── Cinema
│ │ │ ├── CinemaProfile.zip
│ │ │ ├── Data
│ │ │ │ ├── Configuration.cs
│ │ │ │ └── Models
│ │ │ │ │ └── Enums
│ │ │ │ │ └── Genre.cs
│ │ │ └── CinemaProfile.cs
│ │ ├── 01. Model Definition _Problem Description .docx
│ │ └── 01. Model Definition _Skeleton + Datasets.zip
│ ├── 13 - [C# DB Advanced Retake Exam - 16 Dec 2021]
│ │ ├── Artillery
│ │ │ ├── DataProcessor.zip
│ │ │ ├── Data
│ │ │ │ ├── Configuration.cs
│ │ │ │ └── Models
│ │ │ │ │ └── Enums
│ │ │ │ │ └── GunType.cs
│ │ │ ├── DataProcessor
│ │ │ │ └── ImportDto
│ │ │ │ │ └── ImportGunCountriesDto.cs
│ │ │ └── ArtilleryProfile.cs
│ │ ├── 01. Model Defition_Skeleton.zip
│ │ └── 01. Model Defition_Problem_Description.docx
│ ├── 11 - [C# DB Advanced Exam - 04 April 2021]
│ │ ├── 01. Model Defition_Skeleton (2).zip
│ │ ├── 01. Model Defition_Problem Description (1).docx
│ │ └── TeisterMask
│ │ │ ├── Data
│ │ │ ├── Configuration.cs
│ │ │ └── Models
│ │ │ │ └── Enums
│ │ │ │ ├── ExecutionType.cs
│ │ │ │ └── LabelType.cs
│ │ │ └── TeisterMaskProfile.cs
│ ├── 02 - [C# DB Advanced Exam - 07 December 2019]
│ │ ├── 01. Model Defition_Skeleton (2).zip
│ │ ├── 01. Model Defition_Problem Description (1).docx
│ │ └── TeisterMask
│ │ │ ├── Data
│ │ │ ├── Configuration.cs
│ │ │ └── Models
│ │ │ │ └── Enums
│ │ │ │ ├── ExecutionType.cs
│ │ │ │ └── LabelType.cs
│ │ │ └── TeisterMaskProfile.cs
│ ├── 04 - [C# DB Advanced Retake Exam - 14 August 2020]
│ │ ├── SoftJail
│ │ │ ├── Data
│ │ │ │ ├── Configuration.cs
│ │ │ │ └── Models
│ │ │ │ │ └── Enums
│ │ │ │ │ ├── Position.cs
│ │ │ │ │ └── Weapon.cs
│ │ │ ├── ExportResults
│ │ │ │ └── Expected Result - PrisonersInbox.xml
│ │ │ ├── SoftJailProfile.cs
│ │ │ ├── DataProcessor
│ │ │ │ └── ExportDto
│ │ │ │ │ └── ExportPrisonerMessageDto.cs
│ │ │ └── ImportResults
│ │ │ │ ├── ImportDepartmentsCells.txt
│ │ │ │ └── Expected Result - ImportDepartmentsCells.txt
│ │ ├── 01. Model Definition_Problem Description.docx
│ │ └── 01. Model Definition_Skeleton and Datasets.zip
│ └── 06 - [C# DB Advanced Exam Retake - 18 April 2019]
│ │ ├── MusicHub
│ │ ├── Data
│ │ │ ├── Configuration.cs
│ │ │ └── Models
│ │ │ │ └── Enums
│ │ │ │ └── Genre.cs
│ │ └── MusicHubProfile.cs
│ │ ├── 01. Model Defition_Skeleton + Datasets.zip
│ │ └── 01. Model Defition_Problem Description.docx
├── 23 - [ASP.NET - Workshop 1]
│ ├── RealEstates Project
│ │ ├── RealEstates.json
│ │ ├── RealEstates.Web
│ │ │ ├── Views
│ │ │ │ ├── _ViewStart.cshtml
│ │ │ │ ├── _ViewImports.cshtml
│ │ │ │ ├── Home
│ │ │ │ │ └── Privacy.cshtml
│ │ │ │ ├── Shared
│ │ │ │ │ └── _ValidationScriptsPartial.cshtml
│ │ │ │ └── Properties
│ │ │ │ │ └── Search.cshtml
│ │ │ ├── wwwroot
│ │ │ │ ├── favicon.ico
│ │ │ │ └── js
│ │ │ │ │ └── site.js
│ │ │ ├── appsettings.Development.json
│ │ │ ├── Models
│ │ │ │ └── ErrorViewModel.cs
│ │ │ └── appsettings.json
│ │ ├── RealEstates.Models
│ │ │ └── RealEstates.Models.csproj
│ │ └── RealEstates.Services
│ │ │ └── Models
│ │ │ └── DistrictViewModel.cs
│ └── PetStore Project
│ │ ├── Web
│ │ └── PetStore.Web
│ │ │ ├── Views
│ │ │ ├── _ViewStart.cshtml
│ │ │ ├── Home
│ │ │ │ ├── Privacy.cshtml
│ │ │ │ └── Index.cshtml
│ │ │ ├── _ViewImports.cshtml
│ │ │ └── Shared
│ │ │ │ └── _ValidationScriptsPartial.cshtml
│ │ │ ├── wwwroot
│ │ │ ├── favicon.ico
│ │ │ └── js
│ │ │ │ └── site.js
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ └── Models
│ │ │ └── ErrorViewModel.cs
│ │ ├── Data
│ │ ├── PetStore.Data.Models
│ │ │ ├── Enum
│ │ │ │ ├── Gender.cs
│ │ │ │ └── OrderStatus.cs
│ │ │ ├── PetStore.Data.Models.csproj
│ │ │ ├── ToyOrder.cs
│ │ │ ├── FoodOrder.cs
│ │ │ ├── Breed.cs
│ │ │ └── User.cs
│ │ └── PetStore.Data
│ │ │ └── DataSettings.cs
│ │ └── Services
│ │ ├── PetStore.Services
│ │ └── Interfaces
│ │ │ ├── IOrderService.cs
│ │ │ ├── ICategoryService.cs
│ │ │ ├── IBreedService.cs
│ │ │ ├── IUserService.cs
│ │ │ └── IBrandService.cs
│ │ └── PetStore.Services.Models
│ │ ├── Brand
│ │ ├── BrandListingServiceModel.cs
│ │ └── BrandWithToysServiceModel.cs
│ │ ├── Toy
│ │ └── ToyListingServiceModel.cs
│ │ └── Pet
│ │ └── PetListingServiceModel.cs
├── 14 - [Auto Mapper - Exercise]
│ ├── FastFood.Web
│ │ ├── wwwroot
│ │ │ ├── js
│ │ │ │ ├── site.min.js
│ │ │ │ └── site.js
│ │ │ ├── favicon.ico
│ │ │ ├── lib
│ │ │ │ └── bootstrap
│ │ │ │ │ └── dist
│ │ │ │ │ └── fonts
│ │ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ └── css
│ │ │ │ └── site.min.css
│ │ ├── Views
│ │ │ ├── _ViewStart.cshtml
│ │ │ ├── _ViewImports.cshtml
│ │ │ └── Home
│ │ │ │ └── Index.cshtml
│ │ ├── appsettings.Development.json
│ │ ├── ViewModels
│ │ │ ├── Categories
│ │ │ │ ├── CategoryAllViewModel.cs
│ │ │ │ └── CreateCategoryInputModel.cs
│ │ │ ├── Positions
│ │ │ │ ├── PositionsAllViewModel.cs
│ │ │ │ └── CreatePositionInputModel.cs
│ │ │ ├── ErrorViewModel.cs
│ │ │ ├── Orders
│ │ │ │ ├── CreateOrderItemViewModel.cs
│ │ │ │ ├── CreateOrderEmployeeViewModel.cs
│ │ │ │ ├── CreateOrderViewModel.cs
│ │ │ │ └── OrderAllViewModel.cs
│ │ │ ├── Items
│ │ │ │ ├── CreateItemViewModel.cs
│ │ │ │ └── ItemsAllViewModels.cs
│ │ │ └── Employees
│ │ │ │ ├── RegisterEmployeeViewModel.cs
│ │ │ │ └── EmployeesAllViewModel.cs
│ │ └── appsettings.json
│ └── FastFood.Models
│ │ ├── Enums
│ │ └── OrderType.cs
│ │ ├── FastFood.Models.csproj
│ │ └── Category.cs
├── 21 - [Best Practices And Architecture - Lab]
│ ├── RealEstates Project
│ │ ├── RealEstates.json
│ │ └── RealEstates.Models
│ │ │ └── RealEstates.Models.csproj
│ └── PetStore Project
│ │ ├── Data
│ │ ├── PetStore.Data.Models
│ │ │ ├── Enum
│ │ │ │ ├── Gender.cs
│ │ │ │ └── OrderStatus.cs
│ │ │ ├── PetStore.Data.Models.csproj
│ │ │ ├── ToyOrder.cs
│ │ │ ├── FoodOrder.cs
│ │ │ └── Breed.cs
│ │ └── PetStore.Data
│ │ │ └── DataSettings.cs
│ │ └── Services
│ │ └── PetStore.Services.Models
│ │ ├── Brand
│ │ ├── BrandListingServiceModel.cs
│ │ └── BrandWithToysServiceModel.cs
│ │ ├── PetStore.Services.Models.csproj
│ │ └── Toy
│ │ └── ToyListingServiceModel.cs
├── 19 - [Design Patterns - Lab]
│ ├── Singleton
│ │ ├── capitals.txt
│ │ ├── ISingletonContainer.cs
│ │ └── Singleton.csproj
│ ├── Command
│ │ ├── ICommand.cs
│ │ ├── PriceAction.cs
│ │ └── Command.csproj
│ └── Facade
│ │ └── Facade.csproj
├── 24 - [ASP.NET - Workshop 2]
│ ├── Web
│ │ └── PetStore.Web
│ │ │ ├── Views
│ │ │ ├── _ViewStart.cshtml
│ │ │ ├── _ViewImports.cshtml
│ │ │ ├── Home
│ │ │ │ ├── Privacy.cshtml
│ │ │ │ └── Index.cshtml
│ │ │ └── Shared
│ │ │ │ └── _ValidationScriptsPartial.cshtml
│ │ │ ├── wwwroot
│ │ │ ├── favicon.ico
│ │ │ └── js
│ │ │ │ └── site.js
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ └── Models
│ │ │ ├── View Models
│ │ │ └── Category
│ │ │ │ ├── AllCategoriesListingViewModel.cs
│ │ │ │ └── CategoryDetailsViewModel.cs
│ │ │ └── ErrorViewModel.cs
│ ├── Data
│ │ ├── PetStore.Data.Models
│ │ │ ├── Enum
│ │ │ │ ├── Gender.cs
│ │ │ │ └── OrderStatus.cs
│ │ │ ├── PetStore.Data.Models.csproj
│ │ │ ├── ToyOrder.cs
│ │ │ ├── FoodOrder.cs
│ │ │ ├── Breed.cs
│ │ │ └── User.cs
│ │ └── PetStore.Data
│ │ │ └── DataSettings.cs
│ └── Services
│ │ ├── PetStore.Services
│ │ └── Interfaces
│ │ │ ├── IOrderService.cs
│ │ │ ├── IBreedService.cs
│ │ │ ├── IUserService.cs
│ │ │ └── IBrandService.cs
│ │ └── PetStore.Services.Models
│ │ ├── Brand
│ │ ├── BrandListingServiceModel.cs
│ │ └── BrandWithToysServiceModel.cs
│ │ ├── Category
│ │ ├── CreateCategoryServiceModel.cs
│ │ ├── AllCategoriesServiceModel.cs
│ │ ├── EditCategoryServiceModel.cs
│ │ └── DetailsCategoryServiceModel.cs
│ │ ├── Toy
│ │ └── ToyListingServiceModel.cs
│ │ └── Pet
│ │ └── PetListingServiceModel.cs
├── 09 - [Entity Relations - Exercise]
│ ├── P03_FootballBetting.Web
│ │ ├── Views
│ │ │ ├── _ViewStart.cshtml
│ │ │ ├── _ViewImports.cshtml
│ │ │ ├── Home
│ │ │ │ ├── Privacy.cshtml
│ │ │ │ └── Index.cshtml
│ │ │ └── Shared
│ │ │ │ └── _ValidationScriptsPartial.cshtml
│ │ ├── wwwroot
│ │ │ ├── favicon.ico
│ │ │ └── js
│ │ │ │ └── site.js
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ └── Models
│ │ │ └── ErrorViewModel.cs
│ ├── P01_StudentSystem
│ │ ├── Data
│ │ │ ├── Enumerations
│ │ │ │ ├── ContentType.cs
│ │ │ │ └── ResourceType.cs
│ │ │ ├── Configurations
│ │ │ │ └── ConnectionConfiguration.cs
│ │ │ └── Models
│ │ │ │ └── StudentCourse.cs
│ │ ├── StartUp.cs
│ │ └── P01_StudentSystem.csproj
│ ├── P03_FootballBetting.Models
│ │ ├── Enumerations
│ │ │ └── Prediction.cs
│ │ ├── Country.cs
│ │ └── Position.cs
│ └── P03_FootballBetting.Data
│ │ └── Configurations
│ │ └── ConnectionConfiguration.cs
├── 18 - [XML Processing - Exercise]
│ ├── CarDealer
│ │ ├── Datasets
│ │ │ └── Results
│ │ │ │ └── cars.xml
│ │ ├── P11_.zip
│ │ ├── P02_ImportParts.zip
│ │ ├── P03_ImportCars.zip
│ │ ├── P05_ImportSales.zip
│ │ ├── P01_ImportSuppliers.zip
│ │ ├── P04_ImportCustomers.zip
│ │ ├── P07_ExportCarsFromMakeBMW.zip
│ │ ├── P08_ExportLocalSuppliers.zip
│ │ ├── P10_CustomersTotalSales.zip
│ │ ├── P06_ExportCarsWithDistance.zip
│ │ ├── P09_CarsWithTheirListOfParts.zip
│ │ ├── Dtos
│ │ │ ├── Import
│ │ │ │ ├── ImportPartCarDTO.cs
│ │ │ │ └── ImportSupplierDTO.cs
│ │ │ └── Export
│ │ │ │ └── ExportCarPartDTO.cs
│ │ └── Models
│ │ │ ├── PartCar.cs
│ │ │ └── Sale.cs
│ └── ProductShop
│ │ ├── Dtos
│ │ ├── Import
│ │ │ ├── ImportCategoryDTO.cs
│ │ │ └── ImportCategoryProductDTO.cs
│ │ └── Export
│ │ │ ├── ProductSoldDTO.cs
│ │ │ ├── ExportSoldProductsDTO.cs
│ │ │ └── UserRootDTO.cs
│ │ └── Models
│ │ └── CategoryProduct.cs
├── 10 - [LINQ - Exercise]
│ ├── MusicHub.zip
│ └── MusicHub
│ │ └── Data
│ │ ├── Configuration.cs
│ │ └── Models
│ │ └── Enums
│ │ └── Genre.cs
├── 11 - [Advanced Querying - Lab]
│ └── MyCoolCarSystem
│ │ ├── Results
│ │ ├── ResultModel.cs
│ │ ├── CustomerResultModel.cs
│ │ ├── CarResultModel.cs
│ │ └── PurchaseResultModel.cs
│ │ └── Data
│ │ └── Configuration.cs
├── 13 - [Auto Mapper - Lab]
│ ├── BookShop.Models
│ │ ├── Enums
│ │ │ ├── EditionType.cs
│ │ │ └── AgeRestriction.cs
│ │ ├── BookShop.Models.csproj
│ │ ├── BookCategory.cs
│ │ └── Category.cs
│ ├── BookShop.Data
│ │ ├── ViewModels
│ │ │ └── BookDTO.cs
│ │ └── Configurations
│ │ │ └── ConnectionConfiguration.cs
│ └── BookShop.Initializer
│ │ └── BookShop.Initializer.csproj
├── 22 - [Best Practices And Architecture - Exercise]
│ ├── Data
│ │ ├── PetStore.Data.Models
│ │ │ ├── Enum
│ │ │ │ ├── Gender.cs
│ │ │ │ └── OrderStatus.cs
│ │ │ ├── PetStore.Data.Models.csproj
│ │ │ ├── ToyOrder.cs
│ │ │ ├── FoodOrder.cs
│ │ │ ├── Breed.cs
│ │ │ └── User.cs
│ │ └── PetStore.Data
│ │ │ └── DataSettings.cs
│ └── Services
│ │ ├── PetStore.Services
│ │ └── Interfaces
│ │ │ ├── IOrderService.cs
│ │ │ ├── ICategoryService.cs
│ │ │ ├── IBreedService.cs
│ │ │ └── IUserService.cs
│ │ └── PetStore.Services.Models
│ │ ├── Brand
│ │ ├── BrandListingServiceModel.cs
│ │ └── BrandWithToysServiceModel.cs
│ │ ├── PetStore.Services.Models.csproj
│ │ └── Toy
│ │ └── ToyListingServiceModel.cs
├── 20 - [Design Patterns - Exercise]
│ ├── PrototypePattern
│ │ ├── SandwichPrototype.cs
│ │ └── PrototypePattern.csproj
│ ├── CompositePattern
│ │ ├── IGiftOperations.cs
│ │ ├── CompositePattern.csproj
│ │ └── GiftBase.cs
│ └── TemplatePattern
│ │ └── TemplatePattern.csproj
├── 12 - [Advanced Querying - Exercise]
│ ├── BookShop.Models
│ │ ├── BookShop.Models.csproj
│ │ ├── Enums
│ │ │ ├── EditionType.cs
│ │ │ └── AgeRestriction.cs
│ │ ├── BookCategory.cs
│ │ ├── Category.cs
│ │ └── Author.cs
│ ├── BookShop.Data
│ │ └── Configurations
│ │ │ └── ConnectionConfiguration.cs
│ └── BookShop.Initializer
│ │ └── BookShop.Initializer.csproj
├── 07 - [Code First Approach - Exercise]
│ ├── P03_SalesDatabase
│ │ ├── P03_SalesDatabase.zip
│ │ ├── P04-05_MigrationsTasks.zip
│ │ ├── StartUp.cs
│ │ └── Data
│ │ │ ├── Configuration.cs
│ │ │ └── Models
│ │ │ └── Store.cs
│ └── P01_HospitalDatabase
│ │ ├── P01_HospitalDatabase.zip
│ │ ├── StartUp.cs
│ │ ├── P02_HospitalDatabaseModification.zip
│ │ ├── Data
│ │ ├── Configuration.cs
│ │ └── Models
│ │ │ ├── PatientMedicament.cs
│ │ │ ├── Diagnose.cs
│ │ │ └── Medicament.cs
│ │ └── P01_HospitalDatabase.csproj
├── 08 - [Entity Relations - Lab]
│ └── MyCoolCarSystem
│ │ ├── Results
│ │ ├── CustomerResultModel.cs
│ │ ├── CarResultModel.cs
│ │ └── PurchaseResultModel.cs
│ │ └── Data
│ │ └── Configuration.cs
├── 06 - [Code First Approach - Lab]
│ └── EntityFrameworkCoreCodeFirstLab
│ │ └── Data
│ │ ├── Models
│ │ ├── StudentType.cs
│ │ └── StudentInCourse.cs
│ │ └── DataSettings.cs
├── 16 - [JSON Processing - Exercise]
│ ├── CarDealer
│ │ ├── DTO
│ │ │ ├── SuppliersDTO.cs
│ │ │ ├── SaleDTO.cs
│ │ │ ├── CustomersDTO.cs
│ │ │ └── CarsDTO.cs
│ │ └── Models
│ │ │ ├── PartCar.cs
│ │ │ └── Supplier.cs
│ └── ProductShop
│ │ ├── Models
│ │ └── CategoryProduct.cs
│ │ └── DTOs
│ │ └── UserImportDTO.cs
├── 17 - [XML Processing - Lab]
│ ├── Plane.cs
│ └── Article.cs
├── 01 - [ADO.NET - Lab]
│ └── PracticeLab
│ │ └── PracticeLab.csproj
├── 03 - [ORM Fundamentals - Workshop]
│ └── MiniORM.App
│ │ └── MiniORM.App.csproj
├── 02 - [ADO.NET - Exercise]
│ ├── 01 - [InitialSetup]
│ │ └── InitialSetup.csproj
│ ├── 02 - [VillainNames]
│ │ └── VillainNames.csproj
│ ├── 03 - [MinionNames]
│ │ └── MinionNames.csproj
│ ├── 06 - [RemoveVillain]
│ │ └── RemoveVillain.csproj
│ ├── 04 - [AddMinion]
│ │ └── 4. Add Minion.csproj
│ └── 08 - [IncreaseMinionAge]
│ │ └── 8. Increase Minion Age.csproj
└── 05 - [Entity Framework Core Introduction - Exercise]
│ └── Data
│ └── Models
│ └── EmployeeProject.cs
├── HackerRank - MS SQL SERVER Problems
├── P03_SelectAll.sql
├── P04_SelectByID.sql
├── P27_AveragePopulation.sql
├── P05_JapaneseCitiesAttributes.sql
├── P06_JapaneseCitiesNames .sql
├── P20_PopulationDensityDifference.sql
├── P08_WeatherObservationStation3.sql
├── P11_WeatherObservationStation6.sql
├── P12_WeatherObservationStation7.sql
├── P14_WeatherObservationStation9.sql
├── P15_WeatherObservationStation10.sql
├── P19_JapanPopulation.sql
├── P13_WeatherObservationStation8.sql
├── P02_RevisingTheSelectQuery2.sql
├── P32_WeatherObservationStation14.sql
├── P34_WeatherObservationStation16.sql
├── P18_EmployeeSalaries.sql
├── P31_WeatherObservationStation13.sql
├── P38_AfricanCities.sql
├── P16_WeatherObservationStation11.sql
├── P36_WeatherObservationStation18.sql
├── P45_WeatherObservationStation12.sql
├── P39_AveragePopulationOfEachContinent.sql
├── P43_WeatherObservationStation19.sql
├── P40_DrawTheTriangle1.sql
├── P41_DrawTheTriangle2.sql
├── P33_WeatherObservationStation15.sql
├── P26_RevisingAggregationsAverages.sql
├── P25_RevisingAggregationsTheSumFunction.sql
├── P07_WeatherObservationStation1.sql
├── P09_WeatherObservationStation4.sql
├── P47_WeatherObservationStation20.sql
├── P01_RevisingTheSelectQuery1.sql
└── P35_WeatherObservationStation17.sql
├── 01 - [MS SQL Problems]
├── 01 - [Databases Introduction - Lab]
│ └── Team
│ │ ├── P01_CreateDatabase.sql
│ │ └── P04_DeleteTableRowsAndResetCounter.sql
├── 02 - [Databases Introduction - Exercise]
│ └── Minions
│ │ ├── P01_CreateDatabase.sql
│ │ ├── P05_TruncateTableMinions.sql
│ │ ├── P24_DeleteAllRecords.sql
│ │ ├── P06_DropAllTables.sql
│ │ ├── P10_AddCheckConstraint.sql
│ │ ├── P23_DecreaseTaxRate.sql
│ │ ├── P22_IncreaseEmployeesSalary.sql
│ │ ├── P11_SetDefaultValueOfAField.sql
│ │ ├── P03_AlterMinionsTable.sql
│ │ ├── P19_BasicSelectAllFields.sql
│ │ ├── P20_BasicSelectAllFieldsAndOrderThem.sql
│ │ ├── P09_ChangePrimaryKey.sql
│ │ ├── P02_CreateTables.sql
│ │ ├── P17_BackupDatabase.sql
│ │ ├── P04_InsertRecordsInBothTables.sql
│ │ ├── P21_BasicSelectSomeFields.sql
│ │ ├── P12_SetUniqueField.sql
│ │ └── test.sql
├── 04 - [CRUD - Exercise]
│ ├── P02_FindAllDepartmentNames.sql
│ ├── P18_DistinctJobTitles.sql
│ ├── P03_FindAllInformationAboutDepartments.sql
│ ├── P22_AllMountainPeaks.sql
│ ├── P25_AllDiabloCharacters.sql
│ ├── P04_FindSalaryOfEachEmployee.sql
│ ├── P05_FindFullNameOfEachEmployee.sql
│ ├── P19_FindFirst10StartedProjects.sql
│ ├── P07_FindAllDifferentEmployeesSalaries.sql
│ ├── P13_Find5BestPaidEmployees.sql
│ ├── P08_FindAllInformationAboutEmployees.sql
│ ├── P11_FindAllEmployeesWithoutManager.sql
│ ├── P14_FindAllEmployeesExceptMarketing.sql
│ ├── P20_Last7HiredEmployees.sql
│ ├── P15_SortEmployeesTable.sql
│ ├── P06_FindEmailAddressOfEachEmployee.sql
│ ├── P16_CreateViewEmployeesWithSalaries.sql
│ ├── P12_FindAllEmployeesWithSalaryMoreThan50000.sql
│ ├── P09_FindNamesOfAllEmployeesBySalaryInRange.sql
│ ├── P10_FindNamesOfAllEmployees.sql
│ ├── P23_BiggestCountriesByPopulation.sql
│ └── P17_CreateViewEmployeesWithJobTitles.sql
├── 12 - [Indices And Data Aggregation - Exercise]
│ ├── P01_RecordsCount.sql
│ ├── P02_LongestMagicWand.sql
│ ├── P17_EmployeesCountSalaries.sql
│ ├── P05_DepositsSum.sql
│ ├── P13_DepartmentsTotalSalaries.sql
│ ├── P03_LongestMagicWandPerDepositGroups.sql
│ ├── P04_SmallestDepositGroupPerMagicWandSize.sql
│ ├── P16_EmployeesMaximumSalaries.sql
│ ├── P06_DepositsSumForOllivanderFamily.sql
│ ├── P14_EmployeesMinimumSalaries.sql
│ ├── P08_DepositCharge.sql
│ ├── P07_DepositsFilter.sql
│ ├── P11_AverageInterest.sql
│ └── P19_SalaryChallenge.sql
├── 08 - [Built-In Functions - Exercise]
│ ├── P09_LengthOfLastName.sql
│ ├── P05_FindTownsWithNameLength.sql
│ ├── P02_FindNamesOfAllEmployeesByLastName.sql
│ ├── P06_FindTownsStartingWith.sql
│ ├── P01_FindNamesOfAllEmployeesByFirstName.sql
│ ├── P07_FindTownsNotStartingWith.sql
│ ├── P04_FindAllEmployeesExceptEngineers.sql
│ ├── P12_CountriesHoldingA3OrMoreTimes.sql
│ ├── P16_GetUsersWithIPAdressLikePattern.sql
│ ├── P03_FindFirstNamesOfAllEmployees.sql
│ ├── P08_CreateViewEmployeesHiredAfter2000Year.sql
│ ├── P18_OrdersTable.sql
│ ├── P14_GamesFrom2011And2012Year.sql
│ ├── P15_UserEmailProviders.sql
│ ├── P13_MixOfPeakAndRiverNames.sql
│ ├── P10_RankEmployeesBySalary.sql
│ └── P11_FindAllEmployeesWithRank2.sql
├── [Used Databases]
│ ├── DemoDB.sql
│ ├── Diablo-Database.sql
│ ├── Geography-Database.sql
│ └── Gringotts-Database.sql
├── 03 - [CRUD - Lab]
│ ├── Diablo-Database.sql
│ ├── Geography-Database.sql
│ └── CRUDPracticeGeography.sql
├── 07 - [Built-In Functions - Lab]
│ └── DemoDB.sql
├── 17 - [Additional Exercises]
│ ├── Diablo-Database.sql
│ ├── Geography-Database.sql
│ ├── P08_PeaksAndMountains.sql
│ ├── P01_NumberOfUsersForEmailProvider.sql
│ ├── P12_PopulationAndAreaByContinent.sql
│ ├── P11_CountOfCountriesByCurrency.sql
│ └── P06_DisplayAllItemsAboutForbiddenGameType.sql
├── 10 - [Subqueries and Joins - Exercise]
│ ├── P11_MinAverageSalary.sql
│ ├── P01_EmployeeAddress.sql
│ ├── P16_CountriesWithoutAnyMountains.sql
│ ├── P03_SalesEmployee.sql
│ ├── P04_EmployeeDepartments.sql
│ ├── P05_EmployeesWithoutProject.sql
│ ├── P09_EmployeeManager.sql
│ ├── P02_AddressesWithTowns.sql
│ ├── P06_EmployeesHiredAfter.sql
│ ├── P14_CountriesWithRivers.sql
│ ├── P13_CountMountainRanges.sql
│ ├── P12_HighestPeaksInBulgaria.sql
│ ├── P10_EmployeeSummary.sql
│ ├── P07_EmployeesWithProject.sql
│ └── P08_Employee24.sql
├── 18 - [Exam Preparation 1]
│ └── 01. DDL_Problem Description (7).docx
├── 19 - [Exam Preparation 2]
│ └── 01. DDL_Problem Description (9).docx
├── 11 - [Indices And Data Aggregation - Lab]
│ ├── Gringotts-Database.sql
│ └── IndicesAndDataAggregationPractice.sql
├── 06 - [Table Relations - Exercise]
│ └── P09_PeaksInRila.sql
├── 14 - [Functions and Stored Procedures - Exercise]
│ ├── P09_FindFullName.sql
│ ├── P03_TownNamesStartingWith.sql
│ ├── P01_EmployeesWithSalaryAbove35000.sql
│ ├── P02_EmployeesWithSalaryAboveNumber.sql
│ ├── P06_EmployeesBySalaryLevel.sql
│ └── P04_EmployeesFromTown.sql
└── [MS SQL Server Exams]
│ ├── 07 - [Databases MSSQL Server Retake Exam - 11 August 2020]
│ ├── 01. DDL_Скелет.sql
│ └── Databases MSSQL Server Retake Exam - 11 August 2020.docx
│ ├── 03 - [Databases MSSQL Server Exam - 28 Jun 2020]
│ └── Databases MSSQL Server Exam - 28 Jun 2020.docx
│ ├── 01 - [Databases MS SQL Server Exam 17 Feb 2019]
│ └── 01 Databases MSSQL Server Exam - 17 Feb 2019.docx
│ ├── 04 - [Databases MS SQL Server Exam 27 Jun 2020]
│ └── 04 Databases MSSQL Server Exam - 27 Jun 2020.docx
│ ├── 05 - [Databases MS SQL Server Exam 21 Jun 2020]
│ └── 05 Databases MSSQL Server Exam - 21 Jun 2020.docx
│ ├── 06 - [Databases MS SQL Server Exam 20 Oct 2019]
│ └── 06 Databases MSSQL Server Exam - 20 Oct 2019.docx
│ ├── 08 - [Databases MS SQL Server Exam 16 Apr 2019]
│ └── 08 Databases MSSQL Server Exam - 16 Apr 2019.docx
│ ├── 09 - [Databases MS SQL Server Exam 13 February 2021]
│ └── 01. DDL_01. DDL_Problem Description (1).docx
│ ├── 10 - [Databases MSSQL Server Retake Exam - 8 April 2021]
│ └── 06 Databases MSSQL Server Exam - 20 Oct 2019.docx
│ └── 02 - [(Demo) Databases MS SQL Server Exam 13 Oct 2019]
│ └── 02 (Demo) Databases MSSQL Server Exam - 13 Oct 2019.docx
└── README.md
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/txt.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P03_SelectAll.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM City
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/js/site.min.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/01 - [Databases Introduction - Lab]/Team/P01_CreateDatabase.sql:
--------------------------------------------------------------------------------
1 | create database Team
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P04_SelectByID.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM City
3 | WHERE ID = 1661
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/RealEstates Project/RealEstates.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CSharp_SoftUni_Databases_Course!
2 | MS SQL SERVER!
3 |
4 | Entity Framework Core!
5 |
6 |
7 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P01_CreateDatabase.sql:
--------------------------------------------------------------------------------
1 | CREATE DATABASE Minions
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P02_FindAllDepartmentNames.sql:
--------------------------------------------------------------------------------
1 | SELECT [Name]
2 | FROM Departments
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P18_DistinctJobTitles.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT JobTitle
2 | FROM Employees
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P27_AveragePopulation.sql:
--------------------------------------------------------------------------------
1 | SELECT FLOOR(AVG(c.Population))
2 | FROM City AS c
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P05_TruncateTableMinions.sql:
--------------------------------------------------------------------------------
1 | TRUNCATE TABLE Minions
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P24_DeleteAllRecords.sql:
--------------------------------------------------------------------------------
1 | TRUNCATE TABLE Occupancies
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P03_FindAllInformationAboutDepartments.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM Departments
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P05_JapaneseCitiesAttributes.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM City
3 | WHERE COUNTRYCODE = 'JPN'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P22_AllMountainPeaks.sql:
--------------------------------------------------------------------------------
1 | SELECT PeakName
2 | FROM Peaks
3 | ORDER BY PeakName
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P25_AllDiabloCharacters.sql:
--------------------------------------------------------------------------------
1 | SELECT Name
2 | FROM Characters
3 | ORDER BY Name
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Singleton/capitals.txt:
--------------------------------------------------------------------------------
1 | Washington, D.C.
2 | 633427
3 | London
4 | 8908081
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P06_JapaneseCitiesNames .sql:
--------------------------------------------------------------------------------
1 | SELECT [NAME]
2 | FROM City
3 | WHERE COUNTRYCODE = 'JPN'
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P20_PopulationDensityDifference.sql:
--------------------------------------------------------------------------------
1 | SELECT MAX(POPULATION) - MIN(POPULATION)
2 | FROM City
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P06_DropAllTables.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE Minions
2 |
3 | DROP TABLE Towns
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P04_FindSalaryOfEachEmployee.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName, Salary
2 | FROM Employees
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P08_WeatherObservationStation3.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE ID % 2 = 0
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P05_FindFullNameOfEachEmployee.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, MiddleName, LastName
2 | FROM Employees
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P01_RecordsCount.sql:
--------------------------------------------------------------------------------
1 | SELECT COUNT(*) AS Count
2 | FROM WizzardDeposits
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P19_FindFirst10StartedProjects.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (10)*
2 | FROM Projects
3 | ORDER BY StartDate, [Name]
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/Datasets/Results/cars.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P11_WeatherObservationStation6.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY LIKE ('[aeiouAEIOU]%')
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P12_WeatherObservationStation7.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY LIKE '%[aeiouAEIOU]'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P07_FindAllDifferentEmployeesSalaries.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT Salary
2 | FROM Employees
3 | ORDER BY Salary
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P14_WeatherObservationStation9.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY NOT LIKE ('[aeiouAEIOU]%')
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P15_WeatherObservationStation10.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY NOT LIKE ('%[aeiouAEIOU]')
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P19_JapanPopulation.sql:
--------------------------------------------------------------------------------
1 | SELECT SUM(POPULATION) AS TotalCityPopulation
2 | FROM City
3 | WHERE COUNTRYCODE = 'JPN'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/01 - [Databases Introduction - Lab]/Team/P04_DeleteTableRowsAndResetCounter.sql:
--------------------------------------------------------------------------------
1 | delete from Players
2 | DBCC CHECKIDENT (Players, RESEED, 0)
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P13_Find5BestPaidEmployees.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (5) FirstName, LastName
2 | FROM Employees
3 | ORDER BY Salary DESC
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P02_LongestMagicWand.sql:
--------------------------------------------------------------------------------
1 | SELECT MAX(wd.MagicWandSize)
2 | FROM WizzardDeposits AS wd
3 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P13_WeatherObservationStation8.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY LIKE '[aeiouAEIOU]%[aeiouAEIOU]'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P08_FindAllInformationAboutEmployees.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM Employees
3 | WHERE JobTitle = 'Sales Representative'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P11_FindAllEmployeesWithoutManager.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName
2 | FROM Employees
3 | WHERE ManagerID IS NULL
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P14_FindAllEmployeesExceptMarketing.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName
2 | FROM Employees
3 | WHERE DepartmentID != 4
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P09_LengthOfLastName.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName
2 | FROM Employees
3 | WHERE LEN(LastName) = 5
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[Used Databases]/DemoDB.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[Used Databases]/DemoDB.sql
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P02_RevisingTheSelectQuery2.sql:
--------------------------------------------------------------------------------
1 | SELECT NAME
2 | FROM City
3 | WHERE POPULATION > 120000
4 | AND COUNTRYCODE = 'USA'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P20_Last7HiredEmployees.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (7) FirstName, LastName, HireDate
2 | FROM Employees
3 | ORDER BY HireDate DESC
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P32_WeatherObservationStation14.sql:
--------------------------------------------------------------------------------
1 | SELECT FORMAT(ROUND(MAX(s.LAT_N), 4), 'F4')
2 | FROM Station AS s
3 | WHERE s.LAT_N < 137.2345
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P34_WeatherObservationStation16.sql:
--------------------------------------------------------------------------------
1 | SELECT FORMAT(ROUND(MIN(s.LAT_N), 4), 'F4')
2 | FROM Station AS s
3 | WHERE s.LAT_N > 38.7780
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P15_SortEmployeesTable.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM Employees
3 | ORDER BY Salary DESC, FirstName, LastName DESC, MiddleName
4 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using FastFood.Web
2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
3 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P18_EmployeeSalaries.sql:
--------------------------------------------------------------------------------
1 | SELECT name
2 | FROM Employee
3 | WHERE salary > 2000
4 | AND months < 10
5 | ORDER BY employee_id
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P06_FindEmailAddressOfEachEmployee.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName + '.' + LastName + '@softuni.bg' AS [Full Email Address]
2 | FROM Employees
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P16_CreateViewEmployeesWithSalaries.sql:
--------------------------------------------------------------------------------
1 | CREATE VIEW V_EmployeesSalaries AS
2 | SELECT FirstName, LastName, Salary
3 | FROM Employees
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P05_FindTownsWithNameLength.sql:
--------------------------------------------------------------------------------
1 | SELECT Name
2 | FROM Towns
3 | WHERE LEN(Name) BETWEEN 5 AND 6
4 | ORDER BY Name
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/03 - [CRUD - Lab]/Diablo-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/03 - [CRUD - Lab]/Diablo-Database.sql
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P02_FindNamesOfAllEmployeesByLastName.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName
2 | FROM Employees
3 | WHERE LastName LIKE ('%ei%')
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P06_FindTownsStartingWith.sql:
--------------------------------------------------------------------------------
1 | SELECT TownID, Name
2 | FROM Towns
3 | WHERE Name LIKE ('[MKBE]%')
4 | ORDER BY Name
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P17_EmployeesCountSalaries.sql:
--------------------------------------------------------------------------------
1 | SELECT COUNT(e.Salary)
2 | FROM Employees AS e
3 | WHERE e.ManagerID IS NULL
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[Used Databases]/Diablo-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[Used Databases]/Diablo-Database.sql
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P10_AddCheckConstraint.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE Users
2 | ADD CONSTRAINT CK_Users_PasswordLength
3 | CHECK(LEN([Password]) >= 5)
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/03 - [CRUD - Lab]/Geography-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/03 - [CRUD - Lab]/Geography-Database.sql
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P01_FindNamesOfAllEmployeesByFirstName.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName
2 | FROM Employees
3 | WHERE FirstName LIKE ('SA%')
4 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P07_FindTownsNotStartingWith.sql:
--------------------------------------------------------------------------------
1 | SELECT TownID, Name
2 | FROM Towns
3 | WHERE Name NOT LIKE ('[RBD]%')
4 | ORDER BY Name
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[Used Databases]/Geography-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[Used Databases]/Geography-Database.sql
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[Used Databases]/Gringotts-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[Used Databases]/Gringotts-Database.sql
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P31_WeatherObservationStation13.sql:
--------------------------------------------------------------------------------
1 | SELECT FORMAT(ROUND(SUM(s.LAT_N), 4), 'F4')
2 | FROM Station AS s
3 | WHERE s.LAT_N BETWEEN 38.7880 AND 137.2345
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P23_DecreaseTaxRate.sql:
--------------------------------------------------------------------------------
1 | UPDATE Payments
2 | SET TaxRate -= 0.03 * TaxRate
3 |
4 | SELECT TaxRate
5 | FROM Payments
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/07 - [Built-In Functions - Lab]/DemoDB.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/07 - [Built-In Functions - Lab]/DemoDB.sql
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P04_FindAllEmployeesExceptEngineers.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName
2 | FROM Employees
3 | WHERE JobTitle NOT LIKE ('%engineer%')
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/10 - [LINQ - Exercise]/MusicHub.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/10 - [LINQ - Exercise]/MusicHub.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Command/ICommand.cs:
--------------------------------------------------------------------------------
1 | namespace Command
2 | {
3 | public interface ICommand
4 | {
5 | void ExecuteAction();
6 | }
7 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P38_AfricanCities.sql:
--------------------------------------------------------------------------------
1 | SELECT c.Name
2 | FROM City AS c
3 | JOIN Country AS ct ON ct.Code = c.CountryCode
4 | WHERE ct.Continent = 'Africa'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P22_IncreaseEmployeesSalary.sql:
--------------------------------------------------------------------------------
1 | UPDATE Employees
2 | SET Salary += 0.1 * Salary;
3 |
4 | SELECT Salary
5 | FROM Employees
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P12_FindAllEmployeesWithSalaryMoreThan50000.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName, Salary
2 | FROM Employees
3 | WHERE Salary > 50000
4 | ORDER BY Salary DESC
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/Diablo-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/17 - [Additional Exercises]/Diablo-Database.sql
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P16_WeatherObservationStation11.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY NOT LIKE ('[aeiouAEIOU]%')
4 | AND CITY NOT LIKE ('%[aeiouAEIOU]')
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P36_WeatherObservationStation18.sql:
--------------------------------------------------------------------------------
1 | SELECT CAST((ABS(MAX(LAT_N) - MIN(LAT_N)) +
2 | ABS(MAX(LONG_W) - MIN(LONG_W))) AS NUMERIC(18, 4))
3 | FROM Station
4 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P09_FindNamesOfAllEmployeesBySalaryInRange.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName, LastName, JobTitle
2 | FROM Employees
3 | WHERE Salary >= 20000
4 | AND Salary <= 30000
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/Geography-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/17 - [Additional Exercises]/Geography-Database.sql
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Command/PriceAction.cs:
--------------------------------------------------------------------------------
1 | namespace Command
2 | {
3 | public enum PriceAction
4 | {
5 | Increase = 0,
6 | Decrease = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P12_CountriesHoldingA3OrMoreTimes.sql:
--------------------------------------------------------------------------------
1 | SELECT CountryName, IsoCode
2 | FROM Countries
3 | WHERE CountryName LIKE ('%a%a%a%')
4 | ORDER BY IsoCode
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P16_GetUsersWithIPAdressLikePattern.sql:
--------------------------------------------------------------------------------
1 | SELECT Username, IpAddress
2 | FROM Users
3 | WHERE IpAddress LIKE ('___.1%.%.___')
4 | ORDER BY Username
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P11_SetDefaultValueOfAField.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE Users
2 | ADD CONSTRAINT CK_Default_Users_LastLoginTime_Value DEFAULT GETDATE()
3 | FOR LastLoginTime
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P10_FindNamesOfAllEmployees.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName + ' ' + MiddleName + ' ' + LastName AS [Full Name]
2 | FROM Employees
3 | WHERE Salary IN (25000, 14000, 12500, 23600)
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P11_MinAverageSalary.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (1) AVG(Salary) AS MinAverageSalary
2 | FROM Employees
3 | GROUP BY DepartmentID
4 | ORDER BY MinAverageSalary
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P05_DepositsSum.sql:
--------------------------------------------------------------------------------
1 | -- 1
2 | SELECT wd.DepositGroup, SUM(wd.DepositAmount) AS TotalSum
3 | FROM WizzardDeposits AS wd
4 | GROUP BY wd.DepositGroup
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/03 - [CRUD - Lab]/CRUDPracticeGeography.sql:
--------------------------------------------------------------------------------
1 | CREATE VIEW v_GetHighestPeak AS
2 | SELECT TOP (1)*
3 | FROM Peaks
4 | ORDER BY Elevation DESC
5 |
6 | SELECT *
7 | FROM v_GetHighestPeak
8 |
9 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P03_FindFirstNamesOfAllEmployees.sql:
--------------------------------------------------------------------------------
1 | SELECT FirstName
2 | FROM Employees
3 | WHERE DepartmentID IN (3, 10)
4 | AND YEAR(HireDate) BETWEEN 1995 AND 2005
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P11_.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P11_.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P23_BiggestCountriesByPopulation.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (30) CountryName, [Population]
2 | FROM Countries
3 | WHERE ContinentCode = 'EU'
4 | ORDER BY [Population] DESC, CountryName
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Models/Enums/OrderType.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Models.Enums
2 | {
3 | public enum OrderType
4 | {
5 | ForHere = 0,
6 | ToGo = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Singleton/ISingletonContainer.cs:
--------------------------------------------------------------------------------
1 | namespace Singleton
2 | {
3 | public interface ISingletonContainer
4 | {
5 | int GetPopulation(string name);
6 | }
7 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P45_WeatherObservationStation12.sql:
--------------------------------------------------------------------------------
1 | SELECT DISTINCT CITY
2 | FROM Station
3 | WHERE CITY NOT LIKE ('[aeiouAEIOU]%')
4 | AND CITY NOT LIKE ('%[aeiouAEIOU]')
5 | ORDER BY CITY DESC
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P08_CreateViewEmployeesHiredAfter2000Year.sql:
--------------------------------------------------------------------------------
1 | CREATE VIEW V_EmployeesHiredAfter2000 AS
2 | SELECT FirstName, LastName
3 | FROM Employees
4 | WHERE YEAR(HireDate) > 2000
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/18 - [Exam Preparation 1]/01. DDL_Problem Description (7).docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/18 - [Exam Preparation 1]/01. DDL_Problem Description (7).docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/19 - [Exam Preparation 2]/01. DDL_Problem Description (9).docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/19 - [Exam Preparation 2]/01. DDL_Problem Description (9).docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Home Page";
3 | }
4 |
5 |
6 |
Welcome to Fast Food App
7 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using RealEstates.Web
2 | @using RealEstates.Web.Models
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/Enum/Gender.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum Gender
4 | {
5 | Male = 0,
6 | Female = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P39_AveragePopulationOfEachContinent.sql:
--------------------------------------------------------------------------------
1 | SELECT ct.Continent, FLOOR(AVG(c.Population))
2 | FROM City AS c
3 | JOIN Country AS ct ON ct.Code = c.CountryCode
4 | GROUP BY ct.Continent
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/11 - [Indices And Data Aggregation - Lab]/Gringotts-Database.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/11 - [Indices And Data Aggregation - Lab]/Gringotts-Database.sql
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P13_DepartmentsTotalSalaries.sql:
--------------------------------------------------------------------------------
1 | SELECT DepartmentID,
2 | SUM(Salary) as TotalSalary
3 | FROM Employees
4 | GROUP BY DepartmentID
5 | ORDER BY DepartmentID
6 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using P03_FootballBetting.Web
2 | @using P03_FootballBetting.Web.Models
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/11 - [Advanced Querying - Lab]/MyCoolCarSystem/Results/ResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Results
2 | {
3 | public class ResultModel
4 | {
5 | public string FullName { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P02_ImportParts.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P02_ImportParts.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P03_ImportCars.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P03_ImportCars.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P05_ImportSales.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P05_ImportSales.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P03_AlterMinionsTable.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE Minions ADD TownId int
2 |
3 | ALTER TABLE Minions
4 | ADD CONSTRAINT FK_Minions_Towns
5 | FOREIGN KEY (TownId)
6 | REFERENCES Towns(Id);
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P18_OrdersTable.sql:
--------------------------------------------------------------------------------
1 | SELECT ProductName, OrderDate,
2 | DATEADD(DAY, 3, OrderDate) AS [Pay Due],
3 | DATEADD(MONTH, 1, OrderDate) AS [Deliver Due]
4 | FROM Orders
5 |
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P03_LongestMagicWandPerDepositGroups.sql:
--------------------------------------------------------------------------------
1 | -- 1
2 | SELECT wd.DepositGroup, MAX(wd.MagicWandSize) AS LongestMagicWand
3 | FROM WizzardDeposits AS wd
4 | GROUP BY DepositGroup
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Models/Enums/EditionType.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Models.Enums
2 | {
3 | public enum EditionType
4 | {
5 | Normal = 0,
6 | Promo = 1,
7 | Gold = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/Enum/Gender.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum Gender
4 | {
5 | Male = 0,
6 | Female = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using PetStore.Web
2 | @using PetStore.Web.Models
3 | @using PetStore.Services.Models.Pet;
4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
5 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P43_WeatherObservationStation19.sql:
--------------------------------------------------------------------------------
1 | -- (X)^2 + (Y)^2 = (Distance)^2
2 |
3 | SELECT CAST(SQRT(POWER(MAX(LAT_N) - MIN(LAT_N), 2)
4 | + POWER(MAX(LONG_W) - MIN(LONG_W), 2)) AS DECIMAL(18, 4))
5 | FROM Station
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Models/BookShop.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Models/Enums/AgeRestriction.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Models.Enums
2 | {
3 | public enum AgeRestriction
4 | {
5 | Minor = 0,
6 | Teen = 1,
7 | Adult = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P01_ImportSuppliers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P01_ImportSuppliers.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P04_ImportCustomers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P04_ImportCustomers.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/Enum/Gender.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum Gender
4 | {
5 | Male = 0,
6 | Female = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Views/Home/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Privacy Policy";
3 | }
4 | @ViewData["Title"]
5 |
6 | Use this page to detail your site's privacy policy.
7 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P40_DrawTheTriangle1.sql:
--------------------------------------------------------------------------------
1 | DECLARE
2 | @counter NVARCHAR(MAX) = 20
3 |
4 | WHILE (@counter > 0)
5 | BEGIN
6 | SELECT REPLICATE('* ', @counter)
7 |
8 | SET @counter -= 1
9 | END
10 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P41_DrawTheTriangle2.sql:
--------------------------------------------------------------------------------
1 | DECLARE
2 | @counter NVARCHAR(MAX) = 1
3 |
4 | WHILE (@counter <= 20)
5 | BEGIN
6 | SELECT REPLICATE('* ', @counter)
7 |
8 | SET @counter += 1
9 | END
10 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P04_SmallestDepositGroupPerMagicWandSize.sql:
--------------------------------------------------------------------------------
1 | -- 1
2 | SELECT TOP 2 wd.DepositGroup
3 | FROM WizzardDeposits AS wd
4 | GROUP BY DepositGroup
5 | ORDER BY AVG(wd.MagicWandSize)
6 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Models/FastFood.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/20 - [Design Patterns - Exercise]/PrototypePattern/SandwichPrototype.cs:
--------------------------------------------------------------------------------
1 | namespace PrototypePattern
2 | {
3 | public abstract class SandwichPrototype
4 | {
5 | public abstract SandwichPrototype Clone();
6 | }
7 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P19_BasicSelectAllFields.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM Towns
3 |
4 |
5 | SELECT *
6 | FROM Departments
7 |
8 |
9 | SELECT *
10 | FROM Employees
11 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P16_EmployeesMaximumSalaries.sql:
--------------------------------------------------------------------------------
1 | SELECT e.DepartmentID, MAX(e.Salary) AS MaxSalary
2 | FROM Employees AS e
3 | GROUP BY e.DepartmentID
4 | HAVING MAX(e.Salary) NOT BETWEEN 30000 AND 70000
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Models/BookShop.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Models/Enums/EditionType.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Models.Enums
2 | {
3 | public enum EditionType
4 | {
5 | Normal = 0,
6 | Promo = 1,
7 | Gold = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P07_ExportCarsFromMakeBMW.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P07_ExportCarsFromMakeBMW.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P08_ExportLocalSuppliers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P08_ExportLocalSuppliers.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P10_CustomersTotalSales.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P10_CustomersTotalSales.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services/Interfaces/IOrderService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IOrderService
4 | {
5 | void CompleteOrder(int orderId);
6 | }
7 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P33_WeatherObservationStation15.sql:
--------------------------------------------------------------------------------
1 | SELECT FORMAT(ROUND(LONG_W, 4), 'F4')
2 | FROM Station
3 | WHERE LAT_N = (SELECT MAX(LAT_N)
4 | FROM Station
5 | WHERE LAT_N < 137.2345)
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P20_BasicSelectAllFieldsAndOrderThem.sql:
--------------------------------------------------------------------------------
1 | SELECT * FROM Towns
2 | ORDER BY [Name]
3 |
4 | SELECT * FROM Departments
5 | ORDER BY [Name]
6 |
7 | SELECT * FROM Employees
8 | ORDER BY Salary DESC
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/04 - [CRUD - Exercise]/P17_CreateViewEmployeesWithJobTitles.sql:
--------------------------------------------------------------------------------
1 | CREATE VIEW V_EmployeeNameJobTitle AS
2 | SELECT FirstName + ' ' + ISNULL(MiddleName, '') + ' ' + LastName AS [Full Name], JobTitle AS [Job Title]
3 | FROM Employees
4 |
5 |
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P14_GamesFrom2011And2012Year.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (50) Name, FORMAT(Start, 'yyyy-MM-dd') AS Start
2 | FROM Games
3 | WHERE YEAR(Start) >= 2011
4 | AND YEAR(Start) <= 2012
5 | ORDER BY Start, Name
6 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/Views/Home/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Privacy Policy";
3 | }
4 | @ViewData["Title"]
5 |
6 | Use this page to detail your site's privacy policy.
7 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Models/Enums/AgeRestriction.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Models.Enums
2 | {
3 | public enum AgeRestriction
4 | {
5 | Minor = 0,
6 | Teen = 1,
7 | Adult = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P06_ExportCarsWithDistance.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P06_ExportCarsWithDistance.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data.Models/Enum/Gender.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum Gender
4 | {
5 | Male = 0,
6 | Female = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services/Interfaces/IOrderService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services
2 | {
3 | public interface IOrderService
4 | {
5 | void CompleteOrder(int orderId);
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/Enum/OrderStatus.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum OrderStatus
4 | {
5 | Paid = 0,
6 | Pending = 1,
7 | Done = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P09_ChangePrimaryKey.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE Users
2 | DROP CONSTRAINT [PK__Users__3214EC0724064A46]
3 |
4 | ALTER TABLE users
5 | ADD CONSTRAINT PK_Users_CompositeIdUsername
6 | PRIMARY KEY (Id, Username)
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P15_UserEmailProviders.sql:
--------------------------------------------------------------------------------
1 | SELECT Username,
2 | SUBSTRING(Email, CHARINDEX('@', Email) + 1, LEN(Email)) AS [Email Provider]
3 | FROM Users
4 | ORDER BY [Email Provider],
5 | Username
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P01_EmployeeAddress.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (5) e.EmployeeID, e.JobTitle, e.AddressID, a.AddressText
2 | FROM Employees AS e
3 | JOIN Addresses AS a ON a.AddressID = e.AddressID
4 | ORDER BY a.AddressID
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/P03_SalesDatabase.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/P03_SalesDatabase.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P09_CarsWithTheirListOfParts.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/P09_CarsWithTheirListOfParts.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services/Interfaces/IOrderService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services
2 | {
3 | public interface IOrderService
4 | {
5 | void CompleteOrder(int orderId);
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/Views/Home/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Privacy Policy";
3 | }
4 | @ViewData["Title"]
5 |
6 | Use this page to detail your site's privacy policy.
7 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/Views/Home/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Privacy Policy";
3 | }
4 | @ViewData["Title"]
5 |
6 | Use this page to detail your site's privacy policy.
7 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/PetStore.Data.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/06 - [Table Relations - Exercise]/P09_PeaksInRila.sql:
--------------------------------------------------------------------------------
1 | SELECT m.MountainRange, p.PeakName, p.Elevation
2 | FROM Peaks AS p
3 | JOIN Mountains AS m ON m.Id = p.MountainId
4 | WHERE m.MountainRange = 'Rila'
5 | ORDER BY p.Elevation DESC
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P16_CountriesWithoutAnyMountains.sql:
--------------------------------------------------------------------------------
1 | SELECT COUNT(*) - COUNT(mc.CountryCode) AS Count
2 | FROM Countries AS c
3 | LEFT JOIN MountainsCountries AS mc
4 | ON c.CountryCode = mc.CountryCode
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Command/Command.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Facade/Facade.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/20 - [Design Patterns - Exercise]/CompositePattern/IGiftOperations.cs:
--------------------------------------------------------------------------------
1 | namespace CompositePattern
2 | {
3 | public interface IGiftOperations
4 | {
5 | void Add(GiftBase gift);
6 |
7 | void Remove(GiftBase gift);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/FastFood.Models/Enums/OrderType.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Models.Enums
2 | {
3 | public enum OrderType
4 | {
5 | ForHere = 0,
6 | ToGo = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P06_DepositsSumForOllivanderFamily.sql:
--------------------------------------------------------------------------------
1 | SELECT wd.DepositGroup, SUM(wd.DepositAmount) AS TotalSum
2 | FROM WizzardDeposits AS wd
3 | WHERE wd.MagicWandCreator = 'Ollivander family'
4 | GROUP BY DepositGroup
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/14 - [Functions and Stored Procedures - Exercise]/P09_FindFullName.sql:
--------------------------------------------------------------------------------
1 | CREATE or ALTER PROCEDURE usp_GetHoldersFullName
2 | AS
3 | SELECT ah.FirstName + ' ' + ah.LastName AS FullName
4 | FROM AccountHolders AS ah
5 | GO
6 |
7 | EXEC usp_GetHoldersFullName
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/P04-05_MigrationsTasks.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/P04-05_MigrationsTasks.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Categories/CategoryAllViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Categories
2 | {
3 | public class CategoryAllViewModel
4 | {
5 | public string Name { get; set; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Positions/PositionsAllViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Positions
2 | {
3 | public class PositionsAllViewModel
4 | {
5 | public string Name { get; set; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/Enum/OrderStatus.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum OrderStatus
4 | {
5 | Paid = 0,
6 | Pending = 1,
7 | Done = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services/Interfaces/ICategoryService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface ICategoryService
4 | {
5 | bool Exists(int categoryId);
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P26_RevisingAggregationsAverages.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO City(name, CountryCode, District, Population)
2 | VALUES ('California', 'CF', 'California', 6000000)
3 |
4 | SELECT AVG(c.Population)
5 | FROM City AS c
6 | WHERE c.District = 'California'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P02_CreateTables.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE Minions
2 | (
3 | Id int PRIMARY KEY,
4 | [Name] nvarchar(50),
5 | Age int
6 | )
7 |
8 | CREATE TABLE Towns
9 | (
10 | Id int PRIMARY KEY,
11 | [Name] nvarchar(50),
12 | )
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P17_BackupDatabase.sql:
--------------------------------------------------------------------------------
1 | BACKUP DATABASE SoftUni TO DISK = 'D:\Downloads\Softuni-backup.bak'
2 |
3 | USE master
4 |
5 | DROP DATABASE SoftUni
6 |
7 | RESTORE DATABASE SoftUni FROM DISK = 'D:\Downloads\Softuni-backup.bak';
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/P01_HospitalDatabase.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/P01_HospitalDatabase.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P01_StudentSystem/Data/Enumerations/ContentType.cs:
--------------------------------------------------------------------------------
1 | namespace P01_StudentSystem.Data.Enumerations
2 | {
3 | public enum ContentType
4 | {
5 | Application = 0,
6 | Pdf = 1,
7 | Zip = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/Enum/OrderStatus.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum OrderStatus
4 | {
5 | Paid = 0,
6 | Pending = 1,
7 | Done = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services/Interfaces/ICategoryService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface ICategoryService
4 | {
5 | bool Exists(int categoryId);
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/PetStore.Data.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/VaporStore/Data/Models/Enums/CardType.cs:
--------------------------------------------------------------------------------
1 | namespace VaporStore.Data.Models.Enums
2 | {
3 | public enum CardType
4 | {
5 | Debit = 0,
6 | Credit = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P25_RevisingAggregationsTheSumFunction.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO City(name, CountryCode, District, Population)
2 | VALUES ('California', 'CF', 'California', 5000000)
3 |
4 | SELECT SUM(c.Population)
5 | FROM City AS c
6 | WHERE c.District = 'California'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P03_SalesEmployee.sql:
--------------------------------------------------------------------------------
1 | SELECT e.EmployeeID, e.FirstName, e.LastName, d.Name
2 | FROM Employees AS e
3 | JOIN Departments AS d ON d.DepartmentID = e.DepartmentID
4 | WHERE d.Name = 'Sales'
5 | ORDER BY e.EmployeeID
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/PetStore.Data.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services/Interfaces/IBreedService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IBreedService
4 | {
5 | void Add(string name);
6 |
7 | bool Exists(int breedId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/StartUp.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace P03_SalesDatabase
4 | {
5 | public class StartUp
6 | {
7 | public static void Main(string[] args)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P01_StudentSystem/StartUp.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace P01_StudentSystem
4 | {
5 | public class StartUp
6 | {
7 | public static void Main(string[] args)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Models/Enumerations/Prediction.cs:
--------------------------------------------------------------------------------
1 | namespace P03_FootballBetting.Data.Models.Enumerations
2 | {
3 | public enum Prediction
4 | {
5 | Win = 1,
6 | Draw = 0,
7 | Loss = -1
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Positions/CreatePositionInputModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Positions
2 | {
3 | public class CreatePositionInputModel
4 | {
5 | public string PositionName { get; set; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/20 - [Design Patterns - Exercise]/TemplatePattern/TemplatePattern.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data.Models/Enum/OrderStatus.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models.Enum
2 | {
3 | public enum OrderStatus
4 | {
5 | Paid = 0,
6 | Pending = 1,
7 | Done = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data/DataSettings.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data
2 | {
3 | public static class DataSettings
4 | {
5 | public const string CONNECTION_STRING = @"Server=.;Database=PetStoreCatalog;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/VaporStore/Data/Models/Enums/PurchaseType.cs:
--------------------------------------------------------------------------------
1 | namespace VaporStore.Data.Models.Enums
2 | {
3 | public enum PurchaseType
4 | {
5 | Retail = 0,
6 | Digital = 1
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/StartUp.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace P01_HospitalDatabase
4 | {
5 | public class StartUp
6 | {
7 | public static void Main(string[] args)
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/08 - [Entity Relations - Lab]/MyCoolCarSystem/Results/CustomerResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Results
2 | {
3 | public class CustomerResultModel
4 | {
5 | public string Name { get; set; }
6 |
7 | public string Town { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/10 - [LINQ - Exercise]/MusicHub/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace MusicHub.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString =
6 | @"Server=.;Database=MusicHub;Trusted_Connection=True";
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/10 - [LINQ - Exercise]/MusicHub/Data/Models/Enums/Genre.cs:
--------------------------------------------------------------------------------
1 | namespace MusicHub.Data.Models.Enums
2 | {
3 | public enum Genre
4 | {
5 | Blues = 0,
6 | Rap = 1,
7 | PopMusic = 2,
8 | Rock = 3,
9 | Jazz = 4
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/11 - [Advanced Querying - Lab]/MyCoolCarSystem/Results/CustomerResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Results
2 | {
3 | public class CustomerResultModel
4 | {
5 | public string Name { get; set; }
6 |
7 | public string Town { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/20 - [Design Patterns - Exercise]/CompositePattern/CompositePattern.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/20 - [Design Patterns - Exercise]/PrototypePattern/PrototypePattern.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using PetStore.Web
2 | @using PetStore.Web.Models
3 | @using PetStore.Web.Models.Pet;
4 | @using PetStore.Services.Models.Pet;
5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
6 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/BookShop/Data/Models/Enums/Genre.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Data.Models.Enums
2 | {
3 | public enum Genre
4 | {
5 | Biography = 1,
6 | Business = 2,
7 | Science = 3
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/PetClinic.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/PetClinic.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.Models/Enums/TripStatus.cs:
--------------------------------------------------------------------------------
1 | namespace Stations.Models.Enums
2 | {
3 | public enum TripStatus
4 | {
5 | OnTime = 0,
6 | Delayed = 1,
7 | Early = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P13_MixOfPeakAndRiverNames.sql:
--------------------------------------------------------------------------------
1 | SELECT PeakName, RiverName, LOWER(CONCAT(PeakName, SUBSTRING(RiverName, 2, LEN(RiverName)-1))) AS Mix
2 | FROM Peaks,
3 | Rivers
4 | WHERE RIGHT(PeakName, 1) = LEFT(RiverName, 1)
5 | ORDER BY Mix
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P04_EmployeeDepartments.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (5) e.EmployeeID, e.FirstName, e.Salary, d.Name
2 | FROM Employees AS e
3 | JOIN Departments AS d ON d.DepartmentID = e.DepartmentID
4 | WHERE e.Salary > 15000
5 | ORDER BY e.DepartmentID
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P05_EmployeesWithoutProject.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (3) e.EmployeeID, e.FirstName
2 | FROM Employees AS e
3 | LEFT JOIN EmployeesProjects AS ep ON e.EmployeeID = ep.EmployeeID
4 | WHERE ep.ProjectID IS NULL
5 | ORDER BY e.EmployeeID
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P14_EmployeesMinimumSalaries.sql:
--------------------------------------------------------------------------------
1 | SELECT e.DepartmentID,
2 | MIN(Salary) AS MinimumSalary
3 | FROM Employees AS e
4 | WHERE e.DepartmentID IN (2, 5, 7)
5 | AND e.HireDate > '01-01-2000'
6 | GROUP BY e.DepartmentID
7 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/07 - [Databases MSSQL Server Retake Exam - 11 August 2020]/01. DDL_Скелет.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/07 - [Databases MSSQL Server Retake Exam - 11 August 2020]/01. DDL_Скелет.sql
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/06 - [Code First Approach - Lab]/EntityFrameworkCoreCodeFirstLab/Data/Models/StudentType.cs:
--------------------------------------------------------------------------------
1 | namespace EntityFrameworkCoreCodeFirstLab.Data.Models
2 | {
3 | public enum StudentType
4 | {
5 | Enrolled = 0,
6 | Graduated = 1,
7 | Banned = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data.Models/PetStore.Data.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.Models/Stations.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P10_RankEmployeesBySalary.sql:
--------------------------------------------------------------------------------
1 | SELECT EmployeeID, FirstName, LastName, Salary,
2 | DENSE_RANK() OVER (PARTITION BY Salary ORDER BY EmployeeID) AS Rank
3 | FROM Employees
4 | WHERE Salary BETWEEN 10000 AND 50000
5 | ORDER BY Salary DESC
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P09_EmployeeManager.sql:
--------------------------------------------------------------------------------
1 | SELECT e.EmployeeID, e.FirstName, e.ManagerID, m.FirstName
2 | FROM Employees AS e
3 | INNER JOIN Employees AS m ON m.EmployeeID = e.ManagerID
4 | WHERE e.ManagerID IN (3, 7)
5 | ORDER BY e.EmployeeID
6 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/14 - [Functions and Stored Procedures - Exercise]/P03_TownNamesStartingWith.sql:
--------------------------------------------------------------------------------
1 | CREATE OR
2 | ALTER PROCEDURE usp_GetTownsStartingWith(@string NVARCHAR(MAX))
3 | AS
4 | SELECT t.Name
5 | FROM Towns AS t
6 | WHERE t.Name LIKE @string + '%'
7 | GO
8 |
9 | EXEC usp_GetTownsStartingWith 'b'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/P08_PeaksAndMountains.sql:
--------------------------------------------------------------------------------
1 | SELECT p.PeakName,
2 | M.MountainRange,
3 | p.Elevation
4 | FROM Peaks AS p
5 | JOIN Mountains M
6 | ON M.Id = p.MountainId
7 | ORDER BY p.Elevation DESC,
8 | p.PeakName
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/P02_HospitalDatabaseModification.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/P02_HospitalDatabaseModification.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services/Interfaces/IBreedService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IBreedService
4 | {
5 | void Add(string name);
6 |
7 | bool Exists(int breedId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services/Interfaces/IUserService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IUserService
4 | {
5 | void Register(string name, string email);
6 |
7 | bool Exists(int userId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.Models/Instagraph.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.Models/Enums/TrainType.cs:
--------------------------------------------------------------------------------
1 | namespace Stations.Models.Enums
2 | {
3 | public enum TrainType
4 | {
5 | HighSpeed = 0,
6 | LongDistance = 1,
7 | Freight = 2
8 | }
9 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P08_DepositCharge.sql:
--------------------------------------------------------------------------------
1 | SELECT wd.DepositGroup, wd.MagicWandCreator, MIN(wd.DepositCharge) AS MinDepositCharge
2 | FROM WizzardDeposits AS wd
3 | GROUP BY wd.DepositGroup, wd.MagicWandCreator
4 | ORDER BY wd.MagicWandCreator, wd.DepositGroup
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/14 - [Functions and Stored Procedures - Exercise]/P01_EmployeesWithSalaryAbove35000.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE usp_GetEmployeesSalaryAbove35000
2 | AS
3 | SELECT e.FirstName, e.LastName
4 | FROM Employees AS e
5 | WHERE e.Salary > 35000
6 | GO
7 |
8 | EXEC usp_EmployeesWithSalaryAbove35000
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services/Interfaces/IBreedService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IBreedService
4 | {
5 | void Add(string name);
6 |
7 | bool Exists(int breedId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data/DataSettings.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data
2 | {
3 | public static class DataSettings
4 | {
5 | public const string CONNECTION_STRING = @"Server=.;Database=PetStoreCatalog;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/Cinema/CinemaProfile.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/Cinema/CinemaProfile.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.App/files/output/PopularUsers.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Username": "ZendArmyhow",
4 | "Followers": 7
5 | },
6 | {
7 | "Username": "BlaSinduxrein",
8 | "Followers": 6
9 | }
10 | ]
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data/DataSettings.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data
2 | {
3 | public static class DataSettings
4 | {
5 | public const string CONNECTION_STRING = @"Server=.;Database=PetStoreCatalog;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/FastFood.Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=FastFood;Trusted_Connection=True";
6 | }
7 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P04_InsertRecordsInBothTables.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO Towns
2 | VALUES (1, 'Sofia'),
3 | (2, 'Plovdiv'),
4 | (3, 'Varna');
5 |
6 | INSERT INTO Minions
7 | VALUES(1, 'Kevin', 22, 1),
8 | (2, 'Bob', 15, 3),
9 | (3, 'Steward', NULL, 2);
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/08 - [Entity Relations - Lab]/MyCoolCarSystem/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Data
2 | {
3 | public static class Configuration
4 | {
5 | public const string CONNECTION_STRING = @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=CarDb;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/11 - [Advanced Querying - Lab]/MyCoolCarSystem/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Data
2 | {
3 | public static class Configuration
4 | {
5 | public const string CONNECTION_STRING = @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=CarDb;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/ErrorViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels
2 | {
3 | public class ErrorViewModel
4 | {
5 | public string RequestId { get; set; }
6 |
7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Orders/CreateOrderItemViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Orders
2 | {
3 | public class CreateOrderItemViewModel
4 | {
5 | public int ItemId { get; set; }
6 |
7 | public string ItemName { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/js/site.js:
--------------------------------------------------------------------------------
1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | // for details on configuring this project to bundle and minify static web assets.
3 |
4 | // Write your JavaScript code.
5 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services/Interfaces/IUserService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IUserService
4 | {
5 | void Register(string name, string email);
6 |
7 | bool Exists(int userId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Brand/BrandListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Brand
2 | {
3 | public class BrandListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/wwwroot/js/site.js:
--------------------------------------------------------------------------------
1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | // for details on configuring this project to bundle and minify static web assets.
3 |
4 | // Write your JavaScript code.
5 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/01. Model Defition_Skeleton.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/01. Model Defition_Skeleton.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/Cinema/CinemaProfile.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/Cinema/CinemaProfile.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P01_StudentSystem/Data/Enumerations/ResourceType.cs:
--------------------------------------------------------------------------------
1 | namespace P01_StudentSystem.Data.Enumerations
2 | {
3 | public enum ResourceType
4 | {
5 | Video = 0,
6 | Presentation = 1,
7 | Document = 2,
8 | Other = 3
9 | }
10 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/CarDealer/DTO/SuppliersDTO.cs:
--------------------------------------------------------------------------------
1 | namespace CarDealer.DTO
2 | {
3 | public class SuppliersDTO
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public int PartsCount { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data/DataSettings.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data
2 | {
3 | public static class DataSettings
4 | {
5 | public const string CONNECTION_STRING = @"Server=.;Database=PetStoreCatalog;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services/Interfaces/IUserService.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Interfaces
2 | {
3 | public interface IUserService
4 | {
5 | void Register(string name, string email);
6 |
7 | bool Exists(int userId);
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/BookShop/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=BookShop;Trusted_Connection=True";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/VaporStore/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace VaporStore.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString =
6 | @"Server=.;Database=VaporStore;Trusted_Connection=True";
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/Cinema/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace Cinema.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=Cinema;Trusted_Connection=True";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/Artillery/DataProcessor.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/Artillery/DataProcessor.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P21_BasicSelectSomeFields.sql:
--------------------------------------------------------------------------------
1 | SELECT [Name]
2 | FROM Towns
3 | ORDER BY [Name]
4 |
5 | SELECT [Name]
6 | FROM Departments
7 | ORDER BY [Name]
8 |
9 | SELECT FirstName, LastName, JobTitle, Salary
10 | FROM Employees
11 | ORDER BY Salary DESC
12 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P02_AddressesWithTowns.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (50) e.FirstName, e.LastName, t.Name, a.AddressText
2 | FROM Employees AS e
3 | JOIN Addresses AS a ON e.AddressID = a.AddressID
4 | JOIN Towns AS t ON t.TownID = a.TownID
5 | ORDER BY e.FirstName, e.LastName
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Data/ViewModels/BookDTO.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Data.ViewModels
2 | {
3 | public class BookDTO
4 | {
5 | public int BookId { get; set; }
6 |
7 | public string Title { get; set; }
8 |
9 | public decimal Price { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/CarDealer/DTO/SaleDTO.cs:
--------------------------------------------------------------------------------
1 | namespace CarDealer.DTO
2 | {
3 | public class SaleDTO
4 | {
5 | public string Make { get; set; }
6 |
7 | public string Model { get; set; }
8 |
9 | public long TravelledDistance { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/VaporStore/Datasets/purchases.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/VaporStore/Datasets/purchases.xml
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/PetClinic/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace PetClinic.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=PetClinic;Trusted_Connection=True";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace Stations.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=Station;Trusted_Connection=True";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/Cinema/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace Cinema.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=Cinema;Trusted_Connection=True";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P07_DepositsFilter.sql:
--------------------------------------------------------------------------------
1 | SELECT wd.DepositGroup, SUM(wd.DepositAmount) AS TotalSum
2 | FROM WizzardDeposits AS wd
3 | WHERE wd.MagicWandCreator = 'Ollivander family'
4 | GROUP BY DepositGroup
5 | HAVING SUM(wd.DepositAmount) < 150000
6 | ORDER BY TotalSum DESC
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/03 - [Databases MSSQL Server Exam - 28 Jun 2020]/Databases MSSQL Server Exam - 28 Jun 2020.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/03 - [Databases MSSQL Server Exam - 28 Jun 2020]/Databases MSSQL Server Exam - 28 Jun 2020.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/wwwroot/js/site.js:
--------------------------------------------------------------------------------
1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | // for details on configuring this project to bundle and minify static web assets.
3 |
4 | // Write your JavaScript code.
5 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Items/CreateItemViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Items
2 | {
3 | public class CreateItemViewModel
4 | {
5 | public int CategoryId { get; set; }
6 |
7 | public string CategoryName { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/wwwroot/js/site.js:
--------------------------------------------------------------------------------
1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | // for details on configuring this project to bundle and minify static web assets.
3 |
4 | // Write your JavaScript code.
5 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/01. Model Definition_Datasets.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/01. Model Definition_Datasets.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace Instagraph.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=Instagraph;Trusted_Connection=True";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/01. Model Defition_Skeleton (2).zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/01. Model Defition_Skeleton (2).zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/01. Model Defition_Skeleton.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/01. Model Defition_Skeleton.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/01 - [Databases MS SQL Server Exam 17 Feb 2019]/01 Databases MSSQL Server Exam - 17 Feb 2019.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/01 - [Databases MS SQL Server Exam 17 Feb 2019]/01 Databases MSSQL Server Exam - 17 Feb 2019.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/04 - [Databases MS SQL Server Exam 27 Jun 2020]/04 Databases MSSQL Server Exam - 27 Jun 2020.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/04 - [Databases MS SQL Server Exam 27 Jun 2020]/04 Databases MSSQL Server Exam - 27 Jun 2020.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/05 - [Databases MS SQL Server Exam 21 Jun 2020]/05 Databases MSSQL Server Exam - 21 Jun 2020.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/05 - [Databases MS SQL Server Exam 21 Jun 2020]/05 Databases MSSQL Server Exam - 21 Jun 2020.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/06 - [Databases MS SQL Server Exam 20 Oct 2019]/06 Databases MSSQL Server Exam - 20 Oct 2019.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/06 - [Databases MS SQL Server Exam 20 Oct 2019]/06 Databases MSSQL Server Exam - 20 Oct 2019.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/08 - [Databases MS SQL Server Exam 16 Apr 2019]/08 Databases MSSQL Server Exam - 16 Apr 2019.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/08 - [Databases MS SQL Server Exam 16 Apr 2019]/08 Databases MSSQL Server Exam - 16 Apr 2019.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/09 - [Databases MS SQL Server Exam 13 February 2021]/01. DDL_01. DDL_Problem Description (1).docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/09 - [Databases MS SQL Server Exam 13 February 2021]/01. DDL_01. DDL_Problem Description (1).docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace P03_SalesDatabase.Data
2 | {
3 | internal static class Configuration
4 | {
5 | internal const string CONNECTION_STRING = @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=SalesDb;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Orders/CreateOrderEmployeeViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Orders
2 | {
3 | public class CreateOrderEmployeeViewModel
4 | {
5 | public int EmployeeId { get; set; }
6 |
7 | public string EmployeeName { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services.Models/Brand/BrandListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Brand
2 | {
3 | public class BrandListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/wwwroot/js/site.js:
--------------------------------------------------------------------------------
1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | // for details on configuring this project to bundle and minify static web assets.
3 |
4 | // Write your JavaScript code.
5 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/01. Model Defition_Skeleton (2).zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/01. Model Defition_Skeleton (2).zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace SoftJail.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=SoftJail;Trusted_Connection=True";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.App/InstagraphProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace Instagraph.App
4 | {
5 | public class InstagraphProfile : Profile
6 | {
7 | public InstagraphProfile()
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/Artillery/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace Artillery.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=.;Database=Artillery;Trusted_Connection=True";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P07_WeatherObservationStation1.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE Station
2 | (
3 | ID INT IDENTITY PRIMARY KEY,
4 | CITY VARCHAR(21) NOT NULL,
5 | STATE VARCHAR(2) NOT NULL,
6 | LAT_N INT NOT NULL,
7 | LONG_W INT NOT NULL
8 | )
9 |
10 | SELECT CITY, STATE
11 | FROM Station
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/P12_SetUniqueField.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE Users
2 | DROP CONSTRAINT PK_Users_CompositeIdUsername
3 |
4 | ALTER TABLE USERS
5 | ADD CONSTRAINT PK_Users_Id
6 | PRIMARY KEY (Id)
7 |
8 | ALTER TABLE Users
9 | ADD CONSTRAINT CK_Users_UsernameLength
10 | CHECK(LEN(Username) >= 3)
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/14 - [Functions and Stored Procedures - Exercise]/P02_EmployeesWithSalaryAboveNumber.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE usp_GetEmployeesSalaryAboveNumber(@number DECIMAL(18, 4))
2 | AS
3 | SELECT e.FirstName, e.LastName
4 | FROM Employees AS e
5 | WHERE e.Salary >= @number
6 | GO
7 |
8 | EXEC usp_EmployeesWithSalaryAboveNumber 48100
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace P01_HospitalDatabase.Data
2 | {
3 | internal static class Configuration
4 | {
5 | internal const string CONNECTION_STRING = @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=Hospital;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/08 - [Entity Relations - Lab]/MyCoolCarSystem/Results/CarResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Results
2 | {
3 | public class CarResultModel
4 | {
5 | public string Vin { get; set; }
6 |
7 | public string Make { get; set; }
8 |
9 | public string Model { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/11 - [Advanced Querying - Lab]/MyCoolCarSystem/Results/CarResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace MyCoolCarSystem.Results
2 | {
3 | public class CarResultModel
4 | {
5 | public string Vin { get; set; }
6 |
7 | public string Make { get; set; }
8 |
9 | public string Model { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/17 - [XML Processing - Lab]/Plane.cs:
--------------------------------------------------------------------------------
1 | namespace XMLProcessingLabPractice
2 | {
3 | class Plane
4 | {
5 | public int Year { get; set; }
6 |
7 | public string Make { get; set; }
8 |
9 | public string Model { get; set; }
10 |
11 | public string Color { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/Dtos/Import/ImportPartCarDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CarDealer.Dtos.Import
4 | {
5 | [XmlType("partId")]
6 | public class ImportPartCarDTO
7 | {
8 | [XmlAttribute("id")]
9 | public int Id { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services.Models/Brand/BrandListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Brand
2 | {
3 | public class BrandListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Category/CreateCategoryServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Category
2 | {
3 | public class CreateCategoryServiceModel
4 | {
5 | public string Name { get; set; }
6 |
7 | public string Description { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Models/View Models/Category/AllCategoriesListingViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Web.Models.View_Models.Category
2 | {
3 | public class AllCategoriesListingViewModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Home Page";
3 | }
4 |
5 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/01. Model Defition_Problem Descriptions.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/01. Model Defition_Problem Descriptions.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/Data/Models/Enums/Position.cs:
--------------------------------------------------------------------------------
1 | namespace SoftJail.Data.Models.Enums
2 | {
3 | public enum Position
4 | {
5 | Overseer = 0,
6 | Guard = 1,
7 | Watcher = 2,
8 | Labour = 3
9 | }
10 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/01. Model Definition_Project Skeleton.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/01. Model Definition_Project Skeleton.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/10 - [Databases MSSQL Server Retake Exam - 8 April 2021]/06 Databases MSSQL Server Exam - 20 Oct 2019.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/10 - [Databases MSSQL Server Retake Exam - 8 April 2021]/06 Databases MSSQL Server Exam - 20 Oct 2019.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Employees/RegisterEmployeeViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Employees
2 | {
3 | public class RegisterEmployeeViewModel
4 | {
5 | public int PositionId { get; set; }
6 |
7 | public string PositionName { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Services/PetStore.Services.Models/Brand/BrandListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Brand
2 | {
3 | public class BrandListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 | }
9 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Models/ErrorViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace PetStore.Web.Models
4 | {
5 | public class ErrorViewModel
6 | {
7 | public string RequestId { get; set; }
8 |
9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/01. Model Definition_Problem Description.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/01. Model Definition_Problem Description.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/01. Model Definition_Skeleton + Datasets.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/01. Model Definition_Skeleton + Datasets.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/01. Model Definition _Problem Description .docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/01. Model Definition _Problem Description .docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/01. Model Definition _Skeleton + Datasets.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/01. Model Definition _Skeleton + Datasets.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/MusicHub/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace MusicHub.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString =
6 | @"Server=.;Database=MusicHub;Trusted_Connection=True";
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/MusicHub/Data/Models/Enums/Genre.cs:
--------------------------------------------------------------------------------
1 | namespace MusicHub.Data.Models.Enums
2 | {
3 | public enum Genre
4 | {
5 | Blues = 0,
6 | Rap = 1,
7 | PopMusic = 2,
8 | Rock = 3,
9 | Jazz = 4
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.Models/Enums/CardType.cs:
--------------------------------------------------------------------------------
1 | namespace Stations.Models.Enums
2 | {
3 | public enum CardType
4 | {
5 | Pupil = 0,
6 | Student = 1,
7 | Elder = 2,
8 | Debilitated = 3,
9 | Normal = 4
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/01. Model Defition_Problem Description (1).docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/01. Model Defition_Problem Description (1).docx
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P09_WeatherObservationStation4.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO Station(CITY, STATE, LAT_N, LONG_W)
2 | VALUES ('New York', 'US', 20, 20),
3 | ('New York', 'US', 20, 20),
4 | ('Bengalaru', 'SW', 20, 20)
5 |
6 | SELECT COUNT(CITY) - COUNT(DISTINCT CITY) AS DiffBetweenTotalCitiesAndDistinctCities
7 | FROM Station
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Home Page";
3 | }
4 |
5 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Data/Configurations/ConnectionConfiguration.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Data.Configurations
2 | {
3 | internal static class ConnectionConfiguration
4 | {
5 | internal const string CONNECTION_STRING = @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=BookShop;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/Models/PartCar.cs:
--------------------------------------------------------------------------------
1 | namespace CarDealer.Models
2 | {
3 | public class PartCar
4 | {
5 | public int PartId { get; set; }
6 | public Part Part { get; set; }
7 |
8 | public int CarId { get; set; }
9 | public Car Car { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/ProductShop/Dtos/Import/ImportCategoryDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace ProductShop.Dtos.Import
4 | {
5 | [XmlType("Category")]
6 | public class ImportCategoryDTO
7 | {
8 | [XmlElement("name")]
9 | public string Name { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/01. Model Defition_Skeleton + Datasets.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/01. Model Defition_Skeleton + Datasets.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/01. Model Defition_Problem_Description.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/01. Model Defition_Problem_Description.docx
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P06_EmployeesHiredAfter.sql:
--------------------------------------------------------------------------------
1 | SELECT e.FirstName, e.LastName, e.HireDate, d.Name AS DeptName
2 | FROM Employees AS e
3 | INNER JOIN Departments AS d ON d.DepartmentID = e.DepartmentID
4 | WHERE e.HireDate > '1999-01-01'
5 | AND (d.Name IN ('Sales', 'Finance'))
6 | ORDER BY e.HireDate
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P11_AverageInterest.sql:
--------------------------------------------------------------------------------
1 | SELECT wd.DepositGroup, wd.IsDepositExpired, AVG(wd.DepositInterest) AS AverageInterest
2 | FROM WizzardDeposits AS wd
3 | WHERE wd.DepositStartDate > '01-01-1985'
4 | GROUP BY wd.DepositGroup, wd.IsDepositExpired
5 | ORDER BY wd.DepositGroup DESC, wd.IsDepositExpired
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/02 - [(Demo) Databases MS SQL Server Exam 13 Oct 2019]/02 (Demo) Databases MSSQL Server Exam - 13 Oct 2019.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/02 - [(Demo) Databases MS SQL Server Exam 13 Oct 2019]/02 (Demo) Databases MSSQL Server Exam - 13 Oct 2019.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/wwwroot/css/site.min.css:
--------------------------------------------------------------------------------
1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/CarDealer/DTO/CustomersDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CarDealer.DTO
4 | {
5 | public class CustomersDTO
6 | {
7 | public string Name { get; set; }
8 |
9 | public string BirthDate { get; set; }
10 |
11 | public bool IsYoungDriver { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Home Page";
3 | }
4 |
5 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/01. Model Defition_Problem Description (1).docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/01. Model Defition_Problem Description (1).docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/01. Model Defition_Problem Description.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/01. Model Defition_Problem Description.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/01. Model Definition_Problem Description (2).docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/01. Model Definition_Problem Description (2).docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/01. Model Definition _Problem Description .docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/01. Model Definition _Problem Description .docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/01. Model Definition _Skeleton + Datasets.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/01. Model Definition _Skeleton + Datasets.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P14_CountriesWithRivers.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (5) c.CountryName, r.RiverName
2 | FROM Countries AS c
3 | LEFT JOIN CountriesRivers AS cr ON cr.CountryCode = c.CountryCode
4 | LEFT JOIN Rivers r ON r.Id = cr.RiverId
5 | WHERE c.ContinentCode = 'AF'
6 | ORDER BY c.CountryName
7 |
8 |
9 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/06 - [Code First Approach - Lab]/EntityFrameworkCoreCodeFirstLab/Data/DataSettings.cs:
--------------------------------------------------------------------------------
1 | namespace EntityFrameworkCoreCodeFirstLab.Data
2 | {
3 | public class DataSettings
4 | {
5 | public const string CONNECTION_STRING =
6 | @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=StudentSystem;Integrated Security=true;";
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Data/Configurations/ConnectionConfiguration.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Data.Configurations
2 | {
3 | internal static class ConnectionConfiguration
4 | {
5 | internal const string CONNECTION_STRING = @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=BookShop;Integrated Security=true;";
6 | }
7 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Web/PetStore.Web/Models/ErrorViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace PetStore.Web.Models
4 | {
5 | public class ErrorViewModel
6 | {
7 | public string RequestId { get; set; }
8 |
9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/TeisterMask/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=DESKTOP-10E0DVG\SQLEXPRESS01;Database=TeisterMask;Trusted_Connection=True";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/01. Model Definition_Problem Description.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/01. Model Definition_Problem Description.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/01. Model Definition_Skeleton and Datasets.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/01. Model Definition_Skeleton and Datasets.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/Data/Models/Enums/Weapon.cs:
--------------------------------------------------------------------------------
1 | namespace SoftJail.Data.Models.Enums
2 | {
3 | public enum Weapon
4 | {
5 | Knife = 0,
6 | FlashPulse = 1,
7 | ChainRifle = 2,
8 | Pistol = 3,
9 | Sniper = 4
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/C# DB Advanced Exam - 5 January 2018 - Skeleton.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/C# DB Advanced Exam - 5 January 2018 - Skeleton.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/TeisterMask/Data/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask.Data
2 | {
3 | public static class Configuration
4 | {
5 | public static string ConnectionString = @"Server=DESKTOP-10E0DVG\SQLEXPRESS01;Database=TeisterMask;Trusted_Connection=True";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/TeisterMask/Data/Models/Enums/ExecutionType.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask.Data.Models.Enums
2 | {
3 | public enum ExecutionType
4 | {
5 | ProductBacklog = 0,
6 | SprintBacklog = 1,
7 | InProgress = 2,
8 | Finished = 3
9 | }
10 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/02 - [Databases Introduction - Exercise]/Minions/test.sql:
--------------------------------------------------------------------------------
1 | /****** Script for SelectTopNRows command from SSMS ******/
2 | SELECT TOP (1000) [Id]
3 | ,[Title]
4 | ,[DirectorId]
5 | ,[CopyrightYear]
6 | ,[Length]
7 | ,[GenreId]
8 | ,[CategoryId]
9 | ,[Rating]
10 | ,[Notes]
11 | FROM [Movies].[dbo].[Movies]
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/[MS SQL Server Exams]/07 - [Databases MSSQL Server Retake Exam - 11 August 2020]/Databases MSSQL Server Retake Exam - 11 August 2020.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/01 - [MS SQL Problems]/[MS SQL Server Exams]/07 - [Databases MSSQL Server Retake Exam - 11 August 2020]/Databases MSSQL Server Retake Exam - 11 August 2020.docx
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/CarDealer/DTO/CarsDTO.cs:
--------------------------------------------------------------------------------
1 | namespace CarDealer.DTO
2 | {
3 | public class CarsDTO
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Make { get; set; }
8 |
9 | public string Model { get; set; }
10 |
11 | public long TravelledDistance { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/Models/ErrorViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace RealEstates.Web.Models
4 | {
5 | public class ErrorViewModel
6 | {
7 | public string RequestId { get; set; }
8 |
9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/ToyOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class ToyOrder
4 | {
5 | public int ToyId { get; set; }
6 |
7 | public Toy Toy { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/TeisterMask/Data/Models/Enums/ExecutionType.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask.Data.Models.Enums
2 | {
3 | public enum ExecutionType
4 | {
5 | ProductBacklog = 0,
6 | SprintBacklog = 1,
7 | InProgress = 2,
8 | Finished = 3
9 | }
10 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/C# DB Advanced Exam - 4 December 2017 - Skeleton.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/C# DB Advanced Exam - 4 December 2017 - Skeleton.zip
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/C# DB Advenced Exam - 5 December 2017 - Skeleton.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/C# DB Advenced Exam - 5 December 2017 - Skeleton.zip
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/P01_NumberOfUsersForEmailProvider.sql:
--------------------------------------------------------------------------------
1 | SELECT SUBSTRING(u.Email, CHARINDEX('@', u.Email) + 1, LEN(u.Email)) AS Provider,
2 | COUNT(u.Email) AS Count
3 | FROM Users AS u
4 | GROUP BY SUBSTRING(u.Email, CHARINDEX('@', u.Email) + 1, LEN(u.Email))
5 | ORDER BY Count DESC, Provider
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Web/Models/ErrorViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace P03_FootballBetting.Web.Models
4 | {
5 | public class ErrorViewModel
6 | {
7 | public string RequestId { get; set; }
8 |
9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Models/BookCategory.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Models
2 | {
3 | public class BookCategory
4 | {
5 | public int BookId { get; set; }
6 |
7 | public Book Book { get; set; }
8 |
9 | public int CategoryId { get; set; }
10 |
11 | public Category Category { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Items/ItemsAllViewModels.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Items
2 | {
3 | public class ItemsAllViewModels
4 | {
5 | public string Name { get; set; }
6 |
7 | public decimal Price { get; set; }
8 |
9 | public string Category { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/FoodOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class FoodOrder
4 | {
5 | public int FoodId { get; set; }
6 |
7 | public Food Food { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/01 - [C# DB Advanced Exam - 13 Dec 2019]/BookShop/DataProcessor/ImportDto/ImportAuthorBookDto.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace BookShop.DataProcessor.ImportDto
4 | {
5 | public class ImportAuthorBookDto
6 | {
7 | [JsonProperty("Id")]
8 | public int? BookId { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P47_WeatherObservationStation20.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP 1 CAST(PERCENTILE_CONT(0.5)
2 | WITHIN GROUP (ORDER BY LAT_N) OVER () AS DECIMAL(18, 4))
3 | FROM Station
4 | ORDER BY LAT_N
5 |
6 | INSERT INTO Station(CITY, STATE, LAT_N, LONG_W)
7 | VALUES ('Sofia', 'SF', 60, 60)
8 |
9 | SELECT *
10 | FROM Station
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P13_CountMountainRanges.sql:
--------------------------------------------------------------------------------
1 | SELECT c.CountryCode, COUNT(m.MountainRange)
2 | FROM Countries AS c
3 | LEFT JOIN MountainsCountries AS mc ON c.CountryCode = mc.CountryCode
4 | INNER JOIN Mountains AS m ON mc.MountainId = m.Id
5 | WHERE c.CountryCode IN ('BG', 'RU', 'US')
6 | GROUP BY c.CountryCode
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.App/ExportResults/ExpectedExports/CardsTicket.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.App/ExportResults/ExpectedExports/CardsTicket.xml
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/14 - [Functions and Stored Procedures - Exercise]/P06_EmployeesBySalaryLevel.sql:
--------------------------------------------------------------------------------
1 | CREATE OR
2 | ALTER PROCEDURE usp_EmployeesBySalaryLevel(@levelOfSalary NVARCHAR(MAX))
3 | AS
4 | SELECT e.FirstName,
5 | e.LastName
6 | FROM Employees AS e
7 | WHERE dbo.ufn_GetSalaryLevel(e.Salary) = @levelOfSalary
8 | GO
9 |
10 | EXEC usp_EmployeesBySalaryLevel 'high'
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P01_StudentSystem/Data/Configurations/ConnectionConfiguration.cs:
--------------------------------------------------------------------------------
1 | namespace P01_StudentSystem.Data
2 | {
3 | public static class ConnectionConfiguration
4 | {
5 | public const string CONNECTION_STRING =
6 | @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=StudentSystem;Integrated Security=true;";
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Models/BookCategory.cs:
--------------------------------------------------------------------------------
1 | namespace BookShop.Models
2 | {
3 | public class BookCategory
4 | {
5 | public int BookId { get; set; }
6 |
7 | public Book Book { get; set; }
8 |
9 | public int CategoryId { get; set; }
10 |
11 | public Category Category { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/FastFood.Models/FastFood.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/ToyOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class ToyOrder
4 | {
5 | public int ToyId { get; set; }
6 |
7 | public Toy Toy { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Category/AllCategoriesServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Category
2 | {
3 | public class AllCategoriesServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Description { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Category/EditCategoryServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Category
2 | {
3 | public class EditCategoryServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Description { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/TeisterMask/Data/Models/Enums/LabelType.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask.Data.Models.Enums
2 | {
3 | public enum LabelType
4 | {
5 | Priority = 0,
6 | CSharpAdvanced = 1,
7 | JavaAdvanced = 2,
8 | EntityFramework = 3,
9 | Hibernate = 4
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/ExportResults/Expected Result - PrisonersInbox.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/georgidelchev/CSharp-Databases/HEAD/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/ExportResults/Expected Result - PrisonersInbox.xml
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/TeisterMask/Data/Models/Enums/LabelType.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask.Data.Models.Enums
2 | {
3 | public enum LabelType
4 | {
5 | Priority = 0,
6 | CSharpAdvanced = 1,
7 | JavaAdvanced = 2,
8 | EntityFramework = 3,
9 | Hibernate = 4
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/Artillery/Data/Models/Enums/GunType.cs:
--------------------------------------------------------------------------------
1 | namespace Artillery.Data.Models.Enums
2 | {
3 | public enum GunType
4 | {
5 | Howitzer,
6 | Mortar,
7 | FieldGun,
8 | AntiAircraftGun,
9 | MountainGun,
10 | AntiTankGun,
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P12_HighestPeaksInBulgaria.sql:
--------------------------------------------------------------------------------
1 | SELECT mc.CountryCode, m.MountainRange, p.PeakName, p.Elevation
2 | FROM Peaks AS p
3 | JOIN Mountains AS m ON m.Id = p.MountainId
4 | JOIN MountainsCountries AS mc ON m.Id = mc.MountainId
5 | WHERE mc.CountryCode = 'BG'
6 | AND p.Elevation > 2835
7 | ORDER BY p.Elevation DESC
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "DefaultConnection": "Server=DESKTOP-10E0DVG\\SQLEXPRESS;Database=FastFood;Trusted_Connection=True;MultipleActiveResultSets=true"
4 | },
5 | "Logging": {
6 | "LogLevel": {
7 | "Default": "Warning"
8 | }
9 | },
10 |
11 | "AllowedHosts": "*"
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/ProductShop/Models/CategoryProduct.cs:
--------------------------------------------------------------------------------
1 | namespace ProductShop.Models
2 | {
3 | public class CategoryProduct
4 | {
5 | public int CategoryId { get; set; }
6 | public Category Category { get; set; }
7 |
8 | public int ProductId { get; set; }
9 | public Product Product { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Services/PetStore.Services.Models/PetStore.Services.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/ToyOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class ToyOrder
4 | {
5 | public int ToyId { get; set; }
6 |
7 | public Toy Toy { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/FoodOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class FoodOrder
4 | {
5 | public int FoodId { get; set; }
6 |
7 | public Food Food { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Category/DetailsCategoryServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Category
2 | {
3 | public class DetailsCategoryServiceModel
4 | {
5 | public int? Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Description { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/12 - [Indices And Data Aggregation - Exercise]/P19_SalaryChallenge.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP 10 e.FirstName,
2 | e.LastName,
3 | e.DepartmentID
4 | FROM Employees AS e
5 | WHERE e.Salary > (SELECT AVG(e1.Salary)
6 | FROM Employees AS e1
7 | WHERE e.DepartmentID = e1.DepartmentID)
8 | ORDER BY e.DepartmentID
9 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/P12_PopulationAndAreaByContinent.sql:
--------------------------------------------------------------------------------
1 | SELECT c.ContinentName,
2 | SUM(CAST(C2.AreaInSqKm AS BIGINT)) AS Area,
3 | SUM(CAST(C2.Population AS BIGINT)) AS Population
4 | FROM Continents AS c
5 | JOIN Countries C2
6 | ON c.ContinentCode = C2.ContinentCode
7 | GROUP BY c.ContinentName
8 | ORDER BY Population DESC
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/01 - [ADO.NET - Lab]/PracticeLab/PracticeLab.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/03 - [ORM Fundamentals - Workshop]/MiniORM.App/MiniORM.App.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P03_SalesDatabase/Data/Models/Store.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace P03_SalesDatabase.Data.Models
4 | {
5 | public class Store
6 | {
7 | public int StoreId { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Sales { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/ProductShop/Models/CategoryProduct.cs:
--------------------------------------------------------------------------------
1 | namespace ProductShop.Models
2 | {
3 | public class CategoryProduct
4 | {
5 | public int CategoryId { get; set; }
6 | public Category Category { get; set; }
7 |
8 | public int ProductId { get; set; }
9 | public Product Product { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/ProductShop/Dtos/Import/ImportCategoryProductDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace ProductShop.Dtos.Import
4 | {
5 | [XmlType("CategoryProduct")]
6 | public class ImportCategoryProductDTO
7 | {
8 | public int CategoryId { get; set; }
9 |
10 | public int ProductId { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/FoodOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class FoodOrder
4 | {
5 | public int FoodId { get; set; }
6 |
7 | public Food Food { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Web/PetStore.Web/Models/View Models/Category/CategoryDetailsViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Web.Models.View_Models.Category
2 | {
3 | public class CategoryDetailsViewModel
4 | {
5 | public int? Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Description { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/07 - [C# DB Advanced Exam - 10 December 2017]/FastFood.App/FastFoodProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace FastFood.App
4 | {
5 | public class FastFoodProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public FastFoodProfile()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/Artillery/DataProcessor/ImportDto/ImportGunCountriesDto.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace Artillery.DataProcessor.ImportDto
4 | {
5 | public class ImportGunCountriesDto
6 | {
7 | [Required]
8 | public int Id { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P10_EmployeeSummary.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP 50 e.EmployeeID, CONCAT(e.FirstName, ' ', e.LastName),
2 | CONCAT(m.FirstName, ' ', m.LastName), d.Name
3 | FROM Employees AS e
4 | INNER JOIN Employees AS m ON m.EmployeeID = e.ManagerID
5 | INNER JOIN Departments AS d ON e.DepartmentID = d.DepartmentID
6 | ORDER BY EmployeeID
7 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data.Models/ToyOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class ToyOrder
4 | {
5 | public int ToyId { get; set; }
6 |
7 | public Toy Toy { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.DataProcessor/DtoModels/Import/ImportCommentPostDto.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Instagraph.DataProcessor.DtoModels.Import
4 | {
5 | public class ImportCommentPostDto
6 | {
7 | [XmlAttribute("id")]
8 | public int Id { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/P11_CountOfCountriesByCurrency.sql:
--------------------------------------------------------------------------------
1 | SELECT c.CurrencyCode,
2 | Description,
3 | COUNT(C2.CountryCode) AS Count
4 | FROM Currencies AS c
5 | LEFT JOIN Countries C2
6 | ON c.CurrencyCode = C2.CurrencyCode
7 | WHERE 1 = 1
8 | HAVING COUNT(*) > 5
9 | ORDER BY Count DESC,
10 | Description
11 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/02 - [ADO.NET - Exercise]/01 - [InitialSetup]/InitialSetup.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/02 - [ADO.NET - Exercise]/02 - [VillainNames]/VillainNames.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/02 - [ADO.NET - Exercise]/03 - [MinionNames]/MinionNames.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Data/Configurations/ConnectionConfiguration.cs:
--------------------------------------------------------------------------------
1 | namespace P03_FootballBetting.Data.Configurations
2 | {
3 | internal static class ConnectionConfiguration
4 | {
5 | internal const string CONNECTION_STRING =
6 | @"Server=DESKTOP-10E0DVG\SQLEXPRESS;Database=FootballBetting;Integrated Security=true;";
7 | }
8 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data.Models/FoodOrder.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Data.Models
2 | {
3 | public class FoodOrder
4 | {
5 | public int FoodId { get; set; }
6 |
7 | public Food Food { get; set; }
8 |
9 | public int OrderId { get; set; }
10 |
11 | public Order Order { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionString": "Server=.;Database=RealEstate;Integrated Security=true",
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft": "Warning",
7 | "Microsoft.Hosting.Lifetime": "Information"
8 | }
9 | },
10 | "AllowedHosts": "*"
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/Breed.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class Breed
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Pets { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/02 - [ADO.NET - Exercise]/06 - [RemoveVillain]/RemoveVillain.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P01_StudentSystem/Data/Models/StudentCourse.cs:
--------------------------------------------------------------------------------
1 | namespace P01_StudentSystem.Data.Models
2 | {
3 | public class StudentCourse
4 | {
5 | public int StudentId { get; set; }
6 |
7 | public Student Student { get; set; }
8 |
9 | public int CourseId { get; set; }
10 |
11 | public Course Course { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Models/RealEstates.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/Cinema/CinemaProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace Cinema
4 | {
5 | public class CinemaProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public CinemaProfile()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services.Models/PetStore.Services.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/Cinema/CinemaProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace Cinema
4 | {
5 | public class CinemaProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public CinemaProfile()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Categories/CreateCategoryInputModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace FastFood.Web.ViewModels.Categories
4 | {
5 | public class CreateCategoryInputModel
6 | {
7 | [Required]
8 | [StringLength(30, MinimumLength = 3)]
9 | public string CategoryName { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Orders/CreateOrderViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FastFood.Web.ViewModels.Orders
4 | {
5 | public class CreateOrderViewModel
6 | {
7 | public List Items { get; set; }
8 |
9 | public List Employees { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/Breed.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class Breed
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Pets { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Toy/ToyListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Toy
2 | {
3 | public class ToyListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public decimal Price { get; set; }
10 |
11 | public int TotalOrders { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/13 - [C# DB Advanced Retake Exam - 16 Dec 2021]/Artillery/ArtilleryProfile.cs:
--------------------------------------------------------------------------------
1 | namespace Artillery
2 | {
3 | using AutoMapper;
4 | class ArtilleryProfile : Profile
5 | {
6 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
7 | public ArtilleryProfile()
8 | {
9 |
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P07_EmployeesWithProject.sql:
--------------------------------------------------------------------------------
1 | SELECT TOP (5) e.EmployeeID, e.FirstName, p.Name AS ProjectName
2 | FROM Employees AS e
3 | INNER JOIN EmployeesProjects AS ep ON e.EmployeeID = ep.EmployeeID
4 | INNER JOIN Projects AS p ON ep.ProjectID = p.ProjectID
5 | WHERE p.StartDate > '2002-08-13'
6 | AND p.EndDate IS NULL
7 | ORDER BY e.EmployeeID
8 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Models/Category.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BookShop.Models
4 | {
5 | public class Category
6 | {
7 | public int CategoryId { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection CategoryBooks { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Orders/OrderAllViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Orders
2 | {
3 | public class OrderAllViewModel
4 | {
5 | public int OrderId { get; set; }
6 |
7 | public string Customer { get; set; }
8 |
9 | public string Employee { get; set; }
10 |
11 | public string DateTime { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/RealEstates Project/RealEstates.Models/RealEstates.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/Breed.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class Breed
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Pets { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/03 - [C# DB Advanced Exam - 08 August 2020]/VaporStore/VaporStoreProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace VaporStore
4 | {
5 | public class VaporStoreProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public VaporStoreProfile()
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/SoftJailProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace SoftJail
4 | {
5 | public class SoftJailProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public SoftJailProfile()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/06 - [C# DB Advanced Exam Retake - 18 April 2019]/MusicHub/MusicHubProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace MusicHub
4 | {
5 | public class MusicHubProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public MusicHubProfile()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.App/StationsProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace Stations.App
4 | {
5 | public class StationsProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public StationsProfile()
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/14 - [Functions and Stored Procedures - Exercise]/P04_EmployeesFromTown.sql:
--------------------------------------------------------------------------------
1 | CREATE PROCEDURE usp_GetEmployeesFromTown(@townName NVARCHAR(MAX))
2 | AS
3 | SELECT e.FirstName, e.LastName
4 | FROM Employees AS e
5 | JOIN Addresses a ON a.AddressID = e.AddressID
6 | JOIN Towns t ON a.TownID = t.TownID
7 | WHERE t.Name = @townName
8 | GO
9 |
10 | EXEC usp_GetEmployeesFromTown 'Sofia'
11 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/05 - [Entity Framework Core Introduction - Exercise]/Data/Models/EmployeeProject.cs:
--------------------------------------------------------------------------------
1 | namespace SoftUni.Models
2 | {
3 | public class EmployeeProject
4 | {
5 | public int EmployeeId { get; set; }
6 |
7 | public int ProjectId { get; set; }
8 |
9 | public virtual Employee Employee { get; set; }
10 |
11 | public virtual Project Project { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Web/ViewModels/Employees/EmployeesAllViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace FastFood.Web.ViewModels.Employees
2 | {
3 | public class EmployeesAllViewModel
4 | {
5 | public string Name { get; set; }
6 |
7 | public int Age { get; set; }
8 |
9 | public string Address { get; set; }
10 |
11 | public string Position { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/Dtos/Export/ExportCarPartDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CarDealer.Dtos.Export
4 | {
5 | [XmlType("part")]
6 | public class ExportCarPartDTO
7 | {
8 | [XmlAttribute("name")]
9 | public string Name { get; set; }
10 |
11 | [XmlAttribute("price")]
12 | public decimal Price { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/ProductShop/Dtos/Export/ProductSoldDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace ProductShop.Dtos.Export
4 | {
5 | [XmlType("Product")]
6 | public class ProductSoldDTO
7 | {
8 | [XmlElement("name")]
9 | public string Name { get; set; }
10 |
11 | [XmlElement("price")]
12 | public decimal Price { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P01_StudentSystem/P01_StudentSystem.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Models/Country.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace P03_FootballBetting.Data.Models
4 | {
5 | public class Country
6 | {
7 | public int CountryId { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Towns { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/CarDealer/Models/PartCar.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CarDealer.Models
6 | {
7 | public class PartCar
8 | {
9 | public int PartId { get; set; }
10 | public Part Part { get; set; }
11 |
12 | public int CarId { get; set; }
13 | public Car Car { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/PetClinic/App/PetClinicProfile.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 |
3 | namespace PetClinic.App
4 | {
5 | public class PetClinicProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE THIS CLASS
8 | public PetClinicProfile()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/06 - [Code First Approach - Lab]/EntityFrameworkCoreCodeFirstLab/Data/Models/StudentInCourse.cs:
--------------------------------------------------------------------------------
1 | namespace EntityFrameworkCoreCodeFirstLab.Data.Models
2 | {
3 | public class StudentInCourse
4 | {
5 | public int StudentId { get; set; }
6 |
7 | public Student Student { get; set; }
8 |
9 | public int CourseId { get; set; }
10 |
11 | public Course Course { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/Data/Models/PatientMedicament.cs:
--------------------------------------------------------------------------------
1 | namespace P01_HospitalDatabase.Data.Models
2 | {
3 | public class PatientMedicament
4 | {
5 | public int PatientId { get; set; }
6 |
7 | public Patient Patient { get; set; }
8 |
9 | public int MedicamentId { get; set; }
10 |
11 | public Medicament Medicament { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Models/Category.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BookShop.Models
4 | {
5 | public class Category
6 | {
7 | public int CategoryId { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection CategoryBooks { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/Dtos/Import/ImportSupplierDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace CarDealer.Dtos.Import
4 | {
5 | [XmlType("Supplier")]
6 | public class ImportSupplierDTO
7 | {
8 | [XmlElement("name")]
9 | public string Name { get; set; }
10 |
11 | [XmlElement("isImporter")]
12 | public bool IsImporter { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/19 - [Design Patterns - Lab]/Singleton/Singleton.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 | Always
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Data/PetStore.Data.Models/Breed.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class Breed
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Pets { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services.Models/Toy/ToyListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Toy
2 | {
3 | public class ToyListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public decimal Price { get; set; }
10 |
11 | public int TotalOrders { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Brand/BrandWithToysServiceModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using PetStore.Services.Models.Toy;
3 |
4 | namespace PetStore.Services.Models.Brand
5 | {
6 | public class BrandWithToysServiceModel
7 | {
8 | public string Name { get; set; }
9 |
10 | public IEnumerable Toys { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P01_RevisingTheSelectQuery1.sql:
--------------------------------------------------------------------------------
1 | CREATE DATABASE Country
2 |
3 | CREATE TABLE City
4 | (
5 | ID INT IDENTITY PRIMARY KEY,
6 | NAME VARCHAR(17) NOT NULL,
7 | COUNTRYCODE VARCHAR(3) NOT NULL,
8 | DISTRICT VARCHAR(20) NOT NULL,
9 | POPULATION INT NOT NULL
10 | )
11 |
12 | SELECT *
13 | FROM City
14 | WHERE POPULATION >= 100000
15 | AND COUNTRYCODE = 'USA'
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/17 - [Additional Exercises]/P06_DisplayAllItemsAboutForbiddenGameType.sql:
--------------------------------------------------------------------------------
1 | SELECT i.Name,
2 | i.Price,
3 | i.MinLevel,
4 | Gt.Name
5 | FROM Items AS i
6 | LEFT JOIN GameTypeForbiddenItems Gtfi
7 | ON i.Id = Gtfi.ItemId
8 | LEFT JOIN GameTypes Gt
9 | ON Gt.Id = Gtfi.GameTypeId
10 | ORDER BY Gt.Name DESC,
11 | i.Name
12 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/P01_HospitalDatabase.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/09 - [Entity Relations - Exercise]/P03_FootballBetting.Models/Position.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace P03_FootballBetting.Data.Models
4 | {
5 | public class Position
6 | {
7 | public int PositionId { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Players { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/ProductShop/Dtos/Export/ExportSoldProductsDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace ProductShop.Dtos.Export
4 | {
5 | [XmlType("Product")]
6 | public class ExportSoldProductsDTO
7 | {
8 | [XmlElement("name")]
9 | public string Name { get; set; }
10 |
11 | [XmlElement("price")]
12 | public decimal Price { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services.Models/Toy/ToyListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Toy
2 | {
3 | public class ToyListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public decimal Price { get; set; }
10 |
11 | public int TotalOrders { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/DataProcessor/ExportDto/ExportPrisonerMessageDto.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace SoftJail.DataProcessor.ExportDto
4 | {
5 | [XmlType("Message")]
6 | public class ExportPrisonerMessageDto
7 | {
8 | [XmlElement("Description")]
9 | public string Description { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/10 - [Subqueries and Joins - Exercise]/P08_Employee24.sql:
--------------------------------------------------------------------------------
1 | SELECT e.EmployeeID,
2 | e.FirstName,
3 | CASE
4 | WHEN YEAR(p.StartDate) >= 2005 THEN NULL
5 | ELSE p.Name
6 | END AS [ProjectName]
7 | FROM Employees AS e
8 | JOIN EmployeesProjects ep ON e.EmployeeID = ep.EmployeeID
9 | JOIN Projects p ON ep.ProjectID = p.ProjectID
10 | WHERE e.EmployeeID = 24
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Services/PetStore.Services.Models/Toy/ToyListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Toy
2 | {
3 | public class ToyListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public decimal Price { get; set; }
10 |
11 | public int TotalOrders { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/08 - [C# DB Advanced Exam - 04 December 2017]/Instagraph.DataProcessor/DtoModels/Export/ExportCommentsDto.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace Instagraph.DataProcessor.DtoModels.Export
4 | {
5 | [XmlType("user")]
6 | public class ExportCommentsDto
7 | {
8 | public string Username { get; set; }
9 |
10 | public int MostComments { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/PetClinic/DataProcessor/Dto/Export/ExportProcedureAnimalAidDto.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace PetClinic.DataProcessor.Dto.Export
4 | {
5 | [XmlType("AnimalAid")]
6 | public class ExportProcedureAnimalAidDto
7 | {
8 | public string Name { get; set; }
9 |
10 | public decimal Price { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/08 - [Entity Relations - Lab]/MyCoolCarSystem/Results/PurchaseResultModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MyCoolCarSystem.Results
4 | {
5 | public class PurchaseResultModel
6 | {
7 | public decimal Price { get; set; }
8 |
9 | public DateTime PurchaseDate { get; set; }
10 |
11 | public CarResultModel Car { get; set; }
12 |
13 | public CustomerResultModel Customer { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/11 - [Advanced Querying - Lab]/MyCoolCarSystem/Results/PurchaseResultModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MyCoolCarSystem.Results
4 | {
5 | public class PurchaseResultModel
6 | {
7 | public decimal Price { get; set; }
8 |
9 | public DateTime PurchaseDate { get; set; }
10 |
11 | public CarResultModel Car { get; set; }
12 |
13 | public CustomerResultModel Customer { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/13 - [Auto Mapper - Lab]/BookShop.Initializer/BookShop.Initializer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/CarDealer/Models/Sale.cs:
--------------------------------------------------------------------------------
1 | namespace CarDealer.Models
2 | {
3 | public class Sale
4 | {
5 | public int Id { get; set; }
6 |
7 | public decimal Discount { get; set; }
8 |
9 | public int CarId { get; set; }
10 | public Car Car { get; set; }
11 |
12 | public int CustomerId { get; set; }
13 | public Customer Customer { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services.Models/Brand/BrandWithToysServiceModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using PetStore.Services.Models.Toy;
3 |
4 | namespace PetStore.Services.Models.Brand
5 | {
6 | public class BrandWithToysServiceModel
7 | {
8 | public string Name { get; set; }
9 |
10 | public IEnumerable Toys { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Data/PetStore.Data.Models/User.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class User
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public string Email { get; set; }
12 |
13 | public ICollection Orders { get; set; }
14 | = new HashSet();
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/02 - [ADO.NET - Exercise]/04 - [AddMinion]/4. Add Minion.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 | _4._Add_Minion
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/Data/Models/Diagnose.cs:
--------------------------------------------------------------------------------
1 | namespace P01_HospitalDatabase.Data.Models
2 | {
3 | public class Diagnose
4 | {
5 | public int DiagnoseId { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Comments { get; set; }
10 |
11 | public int PatientId { get; set; }
12 |
13 | public Patient Patient { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Services/PetStore.Services.Models/Brand/BrandWithToysServiceModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using PetStore.Services.Models.Toy;
3 |
4 | namespace PetStore.Services.Models.Brand
5 | {
6 | public class BrandWithToysServiceModel
7 | {
8 | public string Name { get; set; }
9 |
10 | public IEnumerable Toys { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/11 - [C# DB Advanced Exam - 04 April 2021]/TeisterMask/TeisterMaskProfile.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask
2 | {
3 | using AutoMapper;
4 |
5 | public class TeisterMaskProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE OR RENAME THIS CLASS
8 | public TeisterMaskProfile()
9 | {
10 |
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Initializer/BookShop.Initializer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/12 - [Advanced Querying - Exercise]/BookShop.Models/Author.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BookShop.Models
4 | {
5 | public class Author
6 | {
7 | public int AuthorId { get; set; }
8 |
9 | public string FirstName { get; set; }
10 |
11 | public string LastName { get; set; }
12 |
13 | public ICollection Books { get; set; }
14 | = new HashSet();
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/CarDealer/Models/Supplier.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CarDealer.Models
6 | {
7 | public class Supplier
8 | {
9 | public int Id { get; set; }
10 |
11 | public string Name { get; set; }
12 |
13 | public bool IsImporter { get; set; }
14 |
15 | public ICollection Parts { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/17 - [XML Processing - Lab]/Article.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace XMLProcessingLabPractice
4 | {
5 | [XmlType("doc")]
6 | public class Article
7 | {
8 | [XmlElement("title")]
9 | public string Title { get; set; }
10 |
11 | [XmlElement("abstract")]
12 | public string Abstract { get; set; }
13 |
14 | [XmlIgnore]
15 | public string Url { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/20 - [Design Patterns - Exercise]/CompositePattern/GiftBase.cs:
--------------------------------------------------------------------------------
1 | namespace CompositePattern
2 | {
3 | public abstract class GiftBase
4 | {
5 | protected string name;
6 | protected int price;
7 |
8 | protected GiftBase(string name, int price)
9 | {
10 | this.name = name;
11 | this.price = price;
12 | }
13 |
14 | public abstract int CalculateTotalPrice();
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/02 - [C# DB Advanced Exam - 07 December 2019]/TeisterMask/TeisterMaskProfile.cs:
--------------------------------------------------------------------------------
1 | namespace TeisterMask
2 | {
3 | using AutoMapper;
4 |
5 | public class TeisterMaskProfile : Profile
6 | {
7 | // Configure your AutoMapper here if you wish to use it. If not, DO NOT DELETE OR RENAME THIS CLASS
8 | public TeisterMaskProfile()
9 | {
10 |
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/ImportResults/ImportDepartmentsCells.txt:
--------------------------------------------------------------------------------
1 | Invalid Data
2 | Invalid Data
3 | Invalid Data
4 | Imported Cybersecurity with 5 cells
5 | Imported StackOverflow with 4 cells
6 | Imported Blockchain with 7 cells
7 | Imported WebSecurity with 4 cells
8 | Imported ArtificialIntelligence with 6 cells
9 | Invalid Data
10 | Imported DeepWeb with 8 cells
11 | Invalid Data
--------------------------------------------------------------------------------
/HackerRank - MS SQL SERVER Problems/P35_WeatherObservationStation17.sql:
--------------------------------------------------------------------------------
1 | -- 1
2 | SELECT FORMAT(ROUND(LONG_W, 4), 'F4')
3 | FROM Station
4 | WHERE LAT_N = (SELECT MIN(LAT_N)
5 | FROM Station
6 | WHERE LAT_N > 38.7780)
7 |
8 | -- 2
9 | SELECT CAST(LONG_W AS DECIMAL(20, 4))
10 | FROM Station
11 | WHERE LAT_N = (SELECT MIN(LAT_N)
12 | FROM Station
13 | WHERE LAT_N > 38.7780);
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/18 - [XML Processing - Exercise]/ProductShop/Dtos/Export/UserRootDTO.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Xml.Serialization;
3 |
4 | namespace ProductShop.Dtos.Export
5 | {
6 | [XmlRoot("Users")]
7 | public class UserRootDTO
8 | {
9 | [XmlElement("count")]
10 | public int Count { get; set; }
11 |
12 | [XmlElement("users")]
13 | public List Users { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/21 - [Best Practices And Architecture - Lab]/PetStore Project/Services/PetStore.Services.Models/Brand/BrandWithToysServiceModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using PetStore.Services.Models.Toy;
3 |
4 | namespace PetStore.Services.Models.Brand
5 | {
6 | public class BrandWithToysServiceModel
7 | {
8 | public string Name { get; set; }
9 |
10 | public IEnumerable Toys { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services.Models/Pet/PetListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Pet
2 | {
3 | public class PetListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Breed { get; set; }
10 |
11 | public string Category { get; set; }
12 |
13 | public decimal Price { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/05 - [C# DB Advanced Exam - 07 April 2019]/Cinema/Data/Models/Enums/Genre.cs:
--------------------------------------------------------------------------------
1 | namespace Cinema.Data.Models.Enums
2 | {
3 | public enum Genre
4 | {
5 | Action = 0,
6 | Drama = 1,
7 | Comedy = 2,
8 | Crime = 3,
9 | Western = 4,
10 | Romance = 5,
11 | Documentary = 6,
12 | Children = 7,
13 | Animation = 8,
14 | Musical = 9
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/16 - [JSON Processing - Exercise]/ProductShop/DTOs/UserImportDTO.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace ProductShop.DTOs
4 | {
5 | public class UserImportDTO
6 | {
7 | [JsonProperty("firstName")]
8 | public string FirstName { get; set; }
9 |
10 | [JsonProperty("lastName")]
11 | public string LastName { get; set; }
12 |
13 | [JsonProperty("age")]
14 | public int? Age { get; set; }
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Data/PetStore.Data.Models/User.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class User
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public string Email { get; set; }
12 |
13 | public ICollection Orders { get; set; }
14 | = new HashSet();
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/12 - [C# DB Advanced Retake Exam - 11 Apr 2021]/Cinema/Data/Models/Enums/Genre.cs:
--------------------------------------------------------------------------------
1 | namespace Cinema.Data.Models.Enums
2 | {
3 | public enum Genre
4 | {
5 | Action = 0,
6 | Drama = 1,
7 | Comedy = 2,
8 | Crime = 3,
9 | Western = 4,
10 | Romance = 5,
11 | Documentary = 6,
12 | Children = 7,
13 | Animation = 8,
14 | Musical = 9
15 | }
16 | }
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/08 - [Built-In Functions - Exercise]/P11_FindAllEmployeesWithRank2.sql:
--------------------------------------------------------------------------------
1 | SELECT *
2 | FROM (SELECT EmployeeID, FirstName, LastName, Salary,
3 | DENSE_RANK() OVER (PARTITION BY Salary ORDER BY EmployeeID) AS Rank
4 | FROM Employees
5 | WHERE Salary BETWEEN 10000 AND 50000) AS SubQuery
6 | WHERE RANK = 2
7 | ORDER BY Salary DESC
8 |
9 | --
10 | SELECT *
11 | FROM Employees
12 | WHERE FirstName = 'Wendy'
13 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/22 - [Best Practices And Architecture - Exercise]/Data/PetStore.Data.Models/User.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace PetStore.Data.Models
4 | {
5 | public class User
6 | {
7 | public int Id { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public string Email { get; set; }
12 |
13 | public ICollection Orders { get; set; }
14 | = new HashSet();
15 | }
16 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/24 - [ASP.NET - Workshop 2]/Services/PetStore.Services/Interfaces/IBrandService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using PetStore.Services.Models.Brand;
3 |
4 | namespace PetStore.Services.Interfaces
5 | {
6 | public interface IBrandService
7 | {
8 | int Create(string name);
9 |
10 | IEnumerable SearchByName(string name);
11 |
12 | BrandWithToysServiceModel FindByIdWithToys(int id);
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/04 - [C# DB Advanced Retake Exam - 14 August 2020]/SoftJail/ImportResults/Expected Result - ImportDepartmentsCells.txt:
--------------------------------------------------------------------------------
1 | Invalid Data
2 | Invalid Data
3 | Invalid Data
4 | Imported Cybersecurity with 5 cells
5 | Imported StackOverflow with 4 cells
6 | Imported Blockchain with 7 cells
7 | Imported WebSecurity with 4 cells
8 | Imported ArtificialIntelligence with 6 cells
9 | Invalid Data
10 | Imported DeepWeb with 8 cells
11 | Invalid Data
--------------------------------------------------------------------------------
/01 - [MS SQL Problems]/11 - [Indices And Data Aggregation - Lab]/IndicesAndDataAggregationPractice.sql:
--------------------------------------------------------------------------------
1 | SELECT DepartmentID, COUNT(*), MIN(Salary)
2 | FROM Employees AS e
3 | GROUP BY DepartmentID
4 |
5 | SELECT FirstName, AVG(Salary)
6 | FROM Employees
7 | GROUP BY FirstName
8 |
9 | SELECT d.Name, SUM(Salary)
10 | FROM Employees AS e
11 | JOIN Departments d
12 | ON e.DepartmentID = d.DepartmentID
13 | GROUP BY d.Name
14 | ORDER BY d.Name
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/02 - [ADO.NET - Exercise]/08 - [IncreaseMinionAge]/8. Increase Minion Age.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 | _8._Increase_Minion_Age
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/07 - [Code First Approach - Exercise]/P01_HospitalDatabase/Data/Models/Medicament.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace P01_HospitalDatabase.Data.Models
4 | {
5 | public class Medicament
6 | {
7 | public int MedicamentId { get; set; }
8 |
9 | public string Name { get; set; }
10 |
11 | public ICollection Prescriptions { get; set; }
12 | = new HashSet();
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/14 - [Auto Mapper - Exercise]/FastFood.Models/Category.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel.DataAnnotations;
3 |
4 | namespace FastFood.Models
5 | {
6 | public class Category
7 | {
8 | public int Id { get; set; }
9 |
10 | [Required]
11 | [StringLength(30, MinimumLength = 3)]
12 | public string Name { get; set; }
13 |
14 | public ICollection- Items { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services.Models/Pet/PetListingServiceModel.cs:
--------------------------------------------------------------------------------
1 | namespace PetStore.Services.Models.Pet
2 | {
3 | public class PetListingServiceModel
4 | {
5 | public int Id { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string Breed { get; set; }
10 |
11 | public string Category { get; set; }
12 |
13 | public decimal Price { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/PetStore Project/Services/PetStore.Services/Interfaces/IBrandService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using PetStore.Services.Models.Brand;
3 |
4 | namespace PetStore.Services
5 | {
6 | public interface IBrandService
7 | {
8 | int Create(string name);
9 |
10 | IEnumerable SearchByName(string name);
11 |
12 | BrandWithToysServiceModel FindByIdWithToys(int id);
13 | }
14 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Services/Models/DistrictViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace RealEstates.Services.Models
2 | {
3 | public class DistrictViewModel
4 | {
5 | public string Name { get; set; }
6 |
7 | public int MinPrice { get; set; }
8 |
9 | public int MaxPrice { get; set; }
10 |
11 | public double AveragePrice { get; set; }
12 |
13 | public int PropertiesCount { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/23 - [ASP.NET - Workshop 1]/RealEstates Project/RealEstates.Web/Views/Properties/Search.cshtml:
--------------------------------------------------------------------------------
1 |
Search properties by price
2 |
3 |
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/09 - [C# DB Advanced Exam - 05 January 2018]/PetClinic/Results/VetsImport.txt:
--------------------------------------------------------------------------------
1 | Record Michael Jordan successfully imported.
2 | Error: Invalid data.
3 | Record Edmond Halley successfully imported.
4 | Record Niels Bohr successfully imported.
5 | Record Werner Heisenberg successfully imported.
6 | Error: Invalid data.
7 | Error: Invalid data.
8 | Record Jennifer Evans successfully imported.
9 | Error: Invalid data.
10 | Error: Invalid data.
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.App/ImportResults/Classes.txt:
--------------------------------------------------------------------------------
1 | Record First class successfully imported.
2 | Record Second class successfully imported.
3 | Record Third class successfully imported.
4 | Invalid data format.
5 | Record Business class successfully imported.
6 | Invalid data format.
7 | Invalid data format.
8 | Invalid data format.
9 | Invalid data format.
10 | Record Transport class successfully imported.
--------------------------------------------------------------------------------
/02 - [Entity Framework Core]/[Entity Framework Core - Exams]/10 - [C# DB Advenced Exam - 05 December 2017]/Stations.DataProcessor/Dto/Import/ImportTicketCardDto.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 | using System.ComponentModel.DataAnnotations;
3 |
4 | namespace Stations.DataProcessor.Dto.Import
5 | {
6 | [XmlType("Card")]
7 | public class ImportTicketCardDto
8 | {
9 | [Required]
10 | [XmlAttribute("Name")]
11 | public string Name { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------