├── Angular7 ├── src │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── app │ │ ├── app.component.html │ │ ├── shared │ │ │ ├── payment-detail.model.ts │ │ │ └── payment-detail.service.ts │ │ ├── app.component.ts │ │ ├── payment-details │ │ │ ├── payment-details.component.ts │ │ │ ├── payment-details.component.html │ │ │ ├── payment-detail-list │ │ │ │ ├── payment-detail-list.component.html │ │ │ │ └── payment-detail-list.component.ts │ │ │ └── payment-detail │ │ │ │ ├── payment-detail.component.ts │ │ │ │ └── payment-detail.component.html │ │ └── app.module.ts │ ├── favicon.ico │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── tslint.json │ ├── main.ts │ ├── browserslist │ ├── styles.css │ ├── test.ts │ ├── karma.conf.js │ ├── index.html │ └── polyfills.ts ├── e2e │ ├── src │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── tsconfig.e2e.json │ └── protractor.conf.js ├── .editorconfig ├── tsconfig.json ├── appStructure.txt ├── .gitignore ├── README.md ├── package.json ├── tslint.json └── angular.json ├── WebAPI ├── .vs │ ├── WebAPI │ │ ├── v15 │ │ │ ├── Server │ │ │ │ └── sqlite3 │ │ │ │ │ ├── db.lock │ │ │ │ │ ├── storage.ide │ │ │ │ │ ├── storage.ide-shm │ │ │ │ │ └── storage.ide-wal │ │ │ └── .suo │ │ └── DesignTimeBuild │ │ │ └── .dtbcache │ └── config │ │ └── applicationhost.config ├── WebAPI │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.2 │ │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ │ ├── WebAPI.RazorAssemblyInfo.cache │ │ │ │ ├── WebAPI.AssemblyInfoInputs.cache │ │ │ │ ├── WebAPI.RazorTargetAssemblyInfo.cache │ │ │ │ ├── WebAPI.csproj.CoreCompileInputs.cache │ │ │ │ ├── WebAPI.dll │ │ │ │ ├── WebAPI.pdb │ │ │ │ ├── WebAPI.assets.cache │ │ │ │ ├── WebAPI.csprojAssemblyReference.cache │ │ │ │ ├── WebAPI.RazorAssemblyInfo.cs │ │ │ │ ├── WebAPI.AssemblyInfo.cs │ │ │ │ └── WebAPI.csproj.FileListAbsolute.txt │ │ ├── WebAPI.csproj.nuget.cache │ │ ├── WebAPI.csproj.EntityFrameworkCore.targets │ │ ├── WebAPI.csproj.nuget.g.targets │ │ └── WebAPI.csproj.nuget.g.props │ ├── bin │ │ └── Debug │ │ │ └── netcoreapp2.2 │ │ │ ├── WebAPI.dll │ │ │ ├── WebAPI.pdb │ │ │ ├── WebAPI.runtimeconfig.dev.json │ │ │ └── WebAPI.runtimeconfig.json │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Models │ │ ├── PaymentDetailContext.cs │ │ └── PaymentDetail.cs │ ├── Program.cs │ ├── WebAPI.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPI.csproj.user │ ├── Controllers │ │ ├── ValuesController.cs │ │ └── PaymentDetailController.cs │ ├── Migrations │ │ ├── 20190102042443_InitialCreate.cs │ │ ├── PaymentDetailContextModelSnapshot.cs │ │ └── 20190102042443_InitialCreate.Designer.cs │ └── Startup.cs └── WebAPI.sln └── README.md /Angular7/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular7/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.RazorAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | 956d135b4025f3ddc3d3abd4139e3f09fdc815fb 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 8071d147e32d0630849d28d7010f1c7d9f5cfc82 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.RazorTargetAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | 425a257f2524fe85d4c5b963eb1a394a4032abc4 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 9e50af03746d4a5dc1453e5d81cf991f0b028db6 2 | -------------------------------------------------------------------------------- /Angular7/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /Angular7/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/Angular7/src/favicon.ico -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/.vs/WebAPI/v15/.suo -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/DesignTimeBuild/.dtbcache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/.vs/WebAPI/DesignTimeBuild/.dtbcache -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/.vs/WebAPI/v15/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.pdb -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.pdb -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/v15/Server/sqlite3/storage.ide-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/.vs/WebAPI/v15/Server/sqlite3/storage.ide-shm -------------------------------------------------------------------------------- /WebAPI/.vs/WebAPI/v15/Server/sqlite3/storage.ide-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/.vs/WebAPI/v15/Server/sqlite3/storage.ide-wal -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.assets.cache -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/WebAPI.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "2y351Ly/w3MhIHwVKlbt8HvDSG15O47SqNoJgZySX0L8+5Ub9eAmvgnNfUOAuYwkDqoN0fTPCCfyeoWZiH4N8Q==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /Angular7/src/app/shared/payment-detail.model.ts: -------------------------------------------------------------------------------- 1 | export class PaymentDetail { 2 | PMId :number; 3 | CardOwnerName: string; 4 | CardNumber: string; 5 | ExpirationDate: string; 6 | CVV: string; 7 | } 8 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD/master/WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Angular7/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Angular7/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styles:[] 7 | }) 8 | export class AppComponent { 9 | title = 'Angular7'; 10 | } 11 | -------------------------------------------------------------------------------- /Angular7/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Angular7/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Angular7/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\Shamseer\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\Shamseer\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Debug/netcoreapp2.2/WebAPI.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.2", 4 | "framework": { 5 | "name": "Microsoft.AspNetCore.App", 6 | "version": "2.2.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "ConnectionStrings": { 9 | "DevConnection": "Server=(local)\\sqlexpress;Database=PaymentDetailDB;Trusted_Connection=True;MultipleActiveResultSets=True;" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Angular7/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /Angular7/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to Angular7!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /Angular7/src/app/payment-details/payment-details.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-payment-details', 5 | templateUrl: './payment-details.component.html', 6 | styles: [] 7 | }) 8 | export class PaymentDetailsComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Angular7/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Angular7/src/app/payment-details/payment-details.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Payment Detail Register

3 |
4 |
5 |
6 | 7 |
8 |
9 | 10 |
11 |
12 |
-------------------------------------------------------------------------------- /Angular7/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /Angular7/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 -------------------------------------------------------------------------------- /Angular7/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | input.ng-touched.ng-invalid{ 3 | border-color: #dc3545; 4 | } 5 | 6 | input.ng-valid{ 7 | border-color: #28a745; 8 | } 9 | 10 | .green-icon{ 11 | color: #28a745; 12 | } 13 | .red-icon{ 14 | color: #dc3545; 15 | } 16 | 17 | #toast-container > div { 18 | opacity:1; 19 | } 20 | 21 | table tr:hover{ 22 | cursor: pointer; 23 | } -------------------------------------------------------------------------------- /Angular7/src/app/payment-details/payment-detail-list/payment-detail-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 |
{{pd.CardOwnerName}}{{pd.CardNumber}}{{pd.ExpirationDate}} 7 | 8 |
-------------------------------------------------------------------------------- /Angular7/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "target": "es5", 13 | "typeRoots": [ 14 | "node_modules/@types" 15 | ], 16 | "lib": [ 17 | "es2018", 18 | "dom" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Models/PaymentDetailContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebAPI.Models 8 | { 9 | public class PaymentDetailContext : DbContext 10 | { 11 | public PaymentDetailContext(DbContextOptions options) : base(options) 12 | { 13 | 14 | } 15 | 16 | public DbSet PaymentDetails { get; set; } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Angular7/appStructure.txt: -------------------------------------------------------------------------------- 1 | ● src 2 | +---● app 3 | | +--● payment-details 4 | | | |--payment-details.component.ts|.html|.css 5 | | | +--● payment-detail 6 | | | | |--payment-detail.component.ts|.html|.css 7 | | | | 8 | | | +--● payment-detail-list 9 | | | | |--payment-detail-list.component.ts|.html|.css 10 | | | | 11 | | | +--● shared 12 | | | |--payment-detail.service.ts 13 | | | |--payment-detail.model.ts 14 | | | 15 | | |--app.module.ts 16 | | 17 | |--index.html (cdn path for bootstrap & fa icons) -------------------------------------------------------------------------------- /Angular7/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | yarn-error.log 34 | testem.log 35 | /typings 36 | 37 | # System Files 38 | .DS_Store 39 | Thumbs.db 40 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace WebAPI 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Angular7/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/WebAPI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.2 5 | InProcess 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Angular7/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /Angular7/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /WebAPI/WebAPI/Models/PaymentDetail.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebAPI.Models 9 | { 10 | public class PaymentDetail 11 | { 12 | [Key] 13 | public int PMId { get; set; } 14 | [Required] 15 | [Column(TypeName ="nvarchar(100)")] 16 | public string CardOwnerName { get; set; } 17 | [Required] 18 | [Column(TypeName = "varchar(16)")] 19 | public string CardNumber { get; set; } 20 | [Required] 21 | [Column(TypeName = "varchar(5)")] 22 | public string ExpirationDate { get; set; } 23 | [Required] 24 | [Column(TypeName = "varchar(3)")] 25 | public string CVV { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:59035", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "IIS Express": { 13 | "commandName": "IISExpress", 14 | "launchBrowser": true, 15 | "launchUrl": "api/values", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "WebAPI": { 21 | "commandName": "Project", 22 | "launchBrowser": true, 23 | "launchUrl": "api/values", 24 | "applicationUrl": "http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.RazorAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute("WebAPI.Views")] 15 | [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute("2.1")] 16 | [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute("MVC-2.1")] 17 | [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorExtensionAssemblyNameAttribute("MVC-2.1", "Microsoft.AspNetCore.Mvc.Razor.Extensions")] 18 | 19 | // Generated by the MSBuild WriteCodeFragment class. 20 | 21 | -------------------------------------------------------------------------------- /Angular7/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("WebAPI")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("WebAPI")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("WebAPI")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/WebAPI.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ApiControllerWithContextScaffolder 5 | root/Controller 6 | 600 7 | True 8 | False 9 | True 10 | 11 | WebAPI.Models.PaymentDetailContext 12 | False 13 | 14 | -------------------------------------------------------------------------------- /Angular7/README.md: -------------------------------------------------------------------------------- 1 | # Angular7 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.3. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /Angular7/src/app/shared/payment-detail.service.ts: -------------------------------------------------------------------------------- 1 | import { PaymentDetail } from './payment-detail.model'; 2 | import { Injectable } from '@angular/core'; 3 | import { HttpClient } from "@angular/common/http"; 4 | 5 | @Injectable({ 6 | providedIn: 'root' 7 | }) 8 | export class PaymentDetailService { 9 | formData: PaymentDetail= { 10 | CVV: null, 11 | CardNumber: null, 12 | CardOwnerName: null, 13 | ExpirationDate: null, 14 | PMId: null 15 | }; 16 | 17 | readonly rootURL = 'http://localhost:59035/api'; 18 | list : PaymentDetail[]; 19 | 20 | constructor(private http: HttpClient) { } 21 | 22 | postPaymentDetail() { 23 | return this.http.post(this.rootURL + '/PaymentDetail', this.formData); 24 | } 25 | putPaymentDetail() { 26 | return this.http.put(this.rootURL + '/PaymentDetail/'+ this.formData.PMId, this.formData); 27 | } 28 | deletePaymentDetail(id) { 29 | return this.http.delete(this.rootURL + '/PaymentDetail/'+ id); 30 | } 31 | 32 | refreshList(){ 33 | this.http.get(this.rootURL + '/PaymentDetail') 34 | .toPromise() 35 | .then(res => this.list = res as PaymentDetail[]); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WebAPI/WebAPI.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.168 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAPI", "WebAPI\WebAPI.csproj", "{2F94EBE8-E4DC-489C-9DF7-1A72E0D1E5DE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2F94EBE8-E4DC-489C-9DF7-1A72E0D1E5DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2F94EBE8-E4DC-489C-9DF7-1A72E0D1E5DE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2F94EBE8-E4DC-489C-9DF7-1A72E0D1E5DE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2F94EBE8-E4DC-489C-9DF7-1A72E0D1E5DE}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {EE8245FB-A2FB-44B8-8FDE-B2D35FAD7887} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Controllers/ValuesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace WebAPI.Controllers 8 | { 9 | [Route("api/[controller]")] 10 | [ApiController] 11 | public class ValuesController : ControllerBase 12 | { 13 | // GET api/values 14 | [HttpGet] 15 | public ActionResult> Get() 16 | { 17 | return new string[] { "value1", "value2" }; 18 | } 19 | 20 | // GET api/values/5 21 | [HttpGet("{id}")] 22 | public ActionResult Get(int id) 23 | { 24 | return "value"; 25 | } 26 | 27 | // POST api/values 28 | [HttpPost] 29 | public void Post([FromBody] string value) 30 | { 31 | } 32 | 33 | // PUT api/values/5 34 | [HttpPut("{id}")] 35 | public void Put(int id, [FromBody] string value) 36 | { 37 | } 38 | 39 | // DELETE api/values/5 40 | [HttpDelete("{id}")] 41 | public void Delete(int id) 42 | { 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Angular7/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from "@angular/forms"; 4 | import { HttpClientModule } from "@angular/common/http"; 5 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 6 | 7 | import { ToastrModule } from 'ngx-toastr'; 8 | import { AppComponent } from './app.component'; 9 | import { PaymentDetailsComponent } from './payment-details/payment-details.component'; 10 | import { PaymentDetailComponent } from './payment-details/payment-detail/payment-detail.component'; 11 | import { PaymentDetailListComponent } from './payment-details/payment-detail-list/payment-detail-list.component'; 12 | import { PaymentDetailService } from './shared/payment-detail.service'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | AppComponent, 17 | PaymentDetailsComponent, 18 | PaymentDetailComponent, 19 | PaymentDetailListComponent 20 | ], 21 | imports: [ 22 | BrowserModule, 23 | FormsModule, 24 | HttpClientModule, 25 | BrowserAnimationsModule, 26 | ToastrModule.forRoot() 27 | ], 28 | providers: [PaymentDetailService], 29 | bootstrap: [AppComponent] 30 | }) 31 | export class AppModule { } 32 | -------------------------------------------------------------------------------- /Angular7/src/app/payment-details/payment-detail-list/payment-detail-list.component.ts: -------------------------------------------------------------------------------- 1 | import { PaymentDetail } from './../../shared/payment-detail.model'; 2 | import { PaymentDetailService } from './../../shared/payment-detail.service'; 3 | import { Component, OnInit } from '@angular/core'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | 6 | @Component({ 7 | selector: 'app-payment-detail-list', 8 | templateUrl: './payment-detail-list.component.html', 9 | styles: [] 10 | }) 11 | export class PaymentDetailListComponent implements OnInit { 12 | 13 | constructor(private service: PaymentDetailService, 14 | private toastr: ToastrService) { } 15 | 16 | ngOnInit() { 17 | this.service.refreshList(); 18 | } 19 | 20 | populateForm(pd: PaymentDetail) { 21 | this.service.formData = Object.assign({}, pd); 22 | } 23 | 24 | onDelete(PMId) { 25 | if (confirm('Are you sure to delete this record ?')) { 26 | this.service.deletePaymentDetail(PMId) 27 | .subscribe(res => { 28 | debugger; 29 | this.service.refreshList(); 30 | this.toastr.warning('Deleted successfully', 'Payment Detail Register'); 31 | }, 32 | err => { 33 | debugger; 34 | console.log(err); 35 | }) 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Angular7/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Angular7 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/20190102042443_InitialCreate.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Metadata; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | namespace WebAPI.Migrations 5 | { 6 | public partial class InitialCreate : Migration 7 | { 8 | protected override void Up(MigrationBuilder migrationBuilder) 9 | { 10 | migrationBuilder.CreateTable( 11 | name: "PaymentDetails", 12 | columns: table => new 13 | { 14 | PMId = table.Column(nullable: false) 15 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), 16 | CardOwnerName = table.Column(type: "nvarchar(100)", nullable: false), 17 | CardNumber = table.Column(type: "varchar(16)", nullable: false), 18 | ExpirationDate = table.Column(type: "varchar(5)", nullable: false), 19 | CVV = table.Column(type: "varchar(3)", nullable: false) 20 | }, 21 | constraints: table => 22 | { 23 | table.PrimaryKey("PK_PaymentDetails", x => x.PMId); 24 | }); 25 | } 26 | 27 | protected override void Down(MigrationBuilder migrationBuilder) 28 | { 29 | migrationBuilder.DropTable( 30 | name: "PaymentDetails"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Angular7/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular7", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~7.0.0", 15 | "@angular/common": "~7.0.0", 16 | "@angular/compiler": "~7.0.0", 17 | "@angular/core": "~7.0.0", 18 | "@angular/forms": "~7.0.0", 19 | "@angular/http": "~7.0.0", 20 | "@angular/platform-browser": "~7.0.0", 21 | "@angular/platform-browser-dynamic": "~7.0.0", 22 | "@angular/router": "~7.0.0", 23 | "core-js": "^2.5.4", 24 | "ngx-toastr": "^9.1.1", 25 | "rxjs": "~6.3.3", 26 | "zone.js": "~0.8.26" 27 | }, 28 | "devDependencies": { 29 | "@angular-devkit/build-angular": "~0.10.0", 30 | "@angular/cli": "~7.0.3", 31 | "@angular/compiler-cli": "~7.0.0", 32 | "@angular/language-service": "~7.0.0", 33 | "@types/node": "~8.9.4", 34 | "@types/jasmine": "~2.8.8", 35 | "@types/jasminewd2": "~2.0.3", 36 | "codelyzer": "~4.5.0", 37 | "jasmine-core": "~2.99.1", 38 | "jasmine-spec-reporter": "~4.2.1", 39 | "karma": "~3.0.0", 40 | "karma-chrome-launcher": "~2.2.0", 41 | "karma-coverage-istanbul-reporter": "~2.0.1", 42 | "karma-jasmine": "~1.1.2", 43 | "karma-jasmine-html-reporter": "^0.2.2", 44 | "protractor": "~5.4.0", 45 | "ts-node": "~7.0.0", 46 | "tslint": "~5.11.0", 47 | "typescript": "~3.1.1" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/WebAPI.csproj.EntityFrameworkCore.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Angular7/src/app/payment-details/payment-detail/payment-detail.component.ts: -------------------------------------------------------------------------------- 1 | import { PaymentDetailService } from './../../shared/payment-detail.service'; 2 | import { Component, OnInit } from '@angular/core'; 3 | import { NgForm } from '@angular/forms'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | 6 | @Component({ 7 | selector: 'app-payment-detail', 8 | templateUrl: './payment-detail.component.html', 9 | styles: [] 10 | }) 11 | export class PaymentDetailComponent implements OnInit { 12 | 13 | constructor(private service: PaymentDetailService, 14 | private toastr: ToastrService) { } 15 | 16 | ngOnInit() { 17 | this.resetForm(); 18 | } 19 | 20 | 21 | resetForm(form?: NgForm) { 22 | if (form != null) 23 | form.form.reset(); 24 | this.service.formData = { 25 | PMId: 0, 26 | CardOwnerName: '', 27 | CardNumber: '', 28 | ExpirationDate: '', 29 | CVV: '' 30 | } 31 | } 32 | 33 | onSubmit(form: NgForm) { 34 | if (this.service.formData.PMId == 0) 35 | this.insertRecord(form); 36 | else 37 | this.updateRecord(form); 38 | } 39 | 40 | insertRecord(form: NgForm) { 41 | this.service.postPaymentDetail().subscribe( 42 | res => { 43 | debugger; 44 | this.resetForm(form); 45 | this.toastr.success('Submitted successfully', 'Payment Detail Register'); 46 | this.service.refreshList(); 47 | }, 48 | err => { 49 | debugger; 50 | console.log(err); 51 | } 52 | ) 53 | } 54 | updateRecord(form: NgForm) { 55 | this.service.putPaymentDetail().subscribe( 56 | res => { 57 | this.resetForm(form); 58 | this.toastr.info('Submitted successfully', 'Payment Detail Register'); 59 | this.service.refreshList(); 60 | }, 61 | err => { 62 | console.log(err); 63 | } 64 | ) 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/netcoreapp2.2/WebAPI.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\bin\Debug\netcoreapp2.2\WebAPI.deps.json 2 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\bin\Debug\netcoreapp2.2\WebAPI.runtimeconfig.json 3 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\bin\Debug\netcoreapp2.2\WebAPI.runtimeconfig.dev.json 4 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\bin\Debug\netcoreapp2.2\WebAPI.dll 5 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.csproj.CoreCompileInputs.cache 6 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.RazorAssemblyInfo.cache 7 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.RazorAssemblyInfo.cs 8 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.AssemblyInfoInputs.cache 9 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.AssemblyInfo.cs 10 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.RazorTargetAssemblyInfo.cache 11 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\bin\Debug\netcoreapp2.2\WebAPI.pdb 12 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.dll 13 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.pdb 14 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\Debug\netcoreapp2.2\WebAPI.csprojAssemblyReference.cache 15 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/PaymentDetailContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Infrastructure; 4 | using Microsoft.EntityFrameworkCore.Metadata; 5 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 6 | using WebAPI.Models; 7 | 8 | namespace WebAPI.Migrations 9 | { 10 | [DbContext(typeof(PaymentDetailContext))] 11 | partial class PaymentDetailContextModelSnapshot : ModelSnapshot 12 | { 13 | protected override void BuildModel(ModelBuilder modelBuilder) 14 | { 15 | #pragma warning disable 612, 618 16 | modelBuilder 17 | .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") 18 | .HasAnnotation("Relational:MaxIdentifierLength", 128) 19 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 20 | 21 | modelBuilder.Entity("WebAPI.Models.PaymentDetail", b => 22 | { 23 | b.Property("PMId") 24 | .ValueGeneratedOnAdd() 25 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 26 | 27 | b.Property("CVV") 28 | .IsRequired() 29 | .HasColumnType("varchar(3)"); 30 | 31 | b.Property("CardNumber") 32 | .IsRequired() 33 | .HasColumnType("varchar(16)"); 34 | 35 | b.Property("CardOwnerName") 36 | .IsRequired() 37 | .HasColumnType("nvarchar(100)"); 38 | 39 | b.Property("ExpirationDate") 40 | .IsRequired() 41 | .HasColumnType("varchar(5)"); 42 | 43 | b.HasKey("PMId"); 44 | 45 | b.ToTable("PaymentDetails"); 46 | }); 47 | #pragma warning restore 612, 618 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/20190102042443_InitialCreate.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Infrastructure; 4 | using Microsoft.EntityFrameworkCore.Metadata; 5 | using Microsoft.EntityFrameworkCore.Migrations; 6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 | using WebAPI.Models; 8 | 9 | namespace WebAPI.Migrations 10 | { 11 | [DbContext(typeof(PaymentDetailContext))] 12 | [Migration("20190102042443_InitialCreate")] 13 | partial class InitialCreate 14 | { 15 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 16 | { 17 | #pragma warning disable 612, 618 18 | modelBuilder 19 | .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") 20 | .HasAnnotation("Relational:MaxIdentifierLength", 128) 21 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 22 | 23 | modelBuilder.Entity("WebAPI.Models.PaymentDetail", b => 24 | { 25 | b.Property("PMId") 26 | .ValueGeneratedOnAdd() 27 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 28 | 29 | b.Property("CVV") 30 | .IsRequired() 31 | .HasColumnType("varchar(3)"); 32 | 33 | b.Property("CardNumber") 34 | .IsRequired() 35 | .HasColumnType("varchar(16)"); 36 | 37 | b.Property("CardOwnerName") 38 | .IsRequired() 39 | .HasColumnType("nvarchar(100)"); 40 | 41 | b.Property("ExpirationDate") 42 | .IsRequired() 43 | .HasColumnType("varchar(5)"); 44 | 45 | b.HasKey("PMId"); 46 | 47 | b.ToTable("PaymentDetails"); 48 | }); 49 | #pragma warning restore 612, 618 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.AspNetCore.Mvc; 8 | using Microsoft.EntityFrameworkCore; 9 | using Microsoft.Extensions.Configuration; 10 | using Microsoft.Extensions.DependencyInjection; 11 | using Microsoft.Extensions.Logging; 12 | using Microsoft.Extensions.Options; 13 | using Newtonsoft.Json.Serialization; 14 | using WebAPI.Models; 15 | 16 | namespace WebAPI 17 | { 18 | public class Startup 19 | { 20 | public Startup(IConfiguration configuration) 21 | { 22 | Configuration = configuration; 23 | } 24 | 25 | public IConfiguration Configuration { get; } 26 | 27 | // This method gets called by the runtime. Use this method to add services to the container. 28 | public void ConfigureServices(IServiceCollection services) 29 | { 30 | services.AddMvc() 31 | .SetCompatibilityVersion(CompatibilityVersion.Version_2_2) 32 | .AddJsonOptions(options => { 33 | var resolver = options.SerializerSettings.ContractResolver; 34 | if (resolver != null) 35 | (resolver as DefaultContractResolver).NamingStrategy = null; 36 | }); 37 | 38 | services.AddDbContext(options => 39 | options.UseSqlServer(Configuration.GetConnectionString("DevConnection"))); 40 | 41 | services.AddCors(); 42 | 43 | } 44 | 45 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 46 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 47 | { 48 | if (env.IsDevelopment()) 49 | { 50 | app.UseDeveloperExceptionPage(); 51 | } 52 | 53 | app.UseCors(options => 54 | options.WithOrigins("http://localhost:4200") 55 | .AllowAnyMethod() 56 | .AllowAnyHeader()); 57 | 58 | app.UseMvc(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Asp.Net Core Web API and Angular 7 CRUD 2 | 3 | Points discussed : 4 | - How to create Web API in Asp.Net Core with CRUD web methods. 5 | - Enable CORS in Asp.Net Core. 6 | - Angular Form Design with Validation. 7 | 8 | 9 | ## Get the Code 10 | 11 | ``` 12 | $ git clone https://github.com/CodAffection/Asp.Net-Core-Web-API-and-Angular-7-CRUD.git 13 | $ cd Asp.Net-Core-Web-API-and-Angular-7-CRUD/Angular7 14 | $ npm install 15 | //run the app 16 | $ ng serve 17 | //update Web API DB connection string 18 | ``` 19 | 20 | ## How it works ? 21 | 22 | :scroll: Article updated with Angular 9 23 | Url : http://bit.ly/2WezUhy 24 | 25 | :tv: Video tutorial on this same topic 26 | Url : https://youtu.be/fom80TujpYQ 27 | 28 | Video Tutorial for Asp.Net Core Web API and Angular 7 CRUD 31 | 32 | 33 | | :bar_chart: | List of Tutorials | | :moneybag: | Support Us | 34 | |--------------------------:|:---------------------|---|---------------------:|:-------------------------------------| 35 | | Angular |http://bit.ly/2KQN9xF | |Paypal | https://goo.gl/bPcyXW | 36 | | Asp.Net Core |http://bit.ly/30fPDMg | |Amazon Affiliate | https://geni.us/JDzpE | 37 | | React |http://bit.ly/325temF | | 38 | | Python |http://bit.ly/2ws4utg | | :point_right: | Follow Us | 39 | | Node.js |https://goo.gl/viJcFs | |Website |http://www.codaffection.com | 40 | | Asp.Net MVC |https://goo.gl/gvjUJ7 | |YouTube |https://www.youtube.com/codaffection | 41 | | Flutter |https://bit.ly/3ggmmJz| |Facebook |https://www.facebook.com/codaffection | 42 | | Web API |https://goo.gl/itVayJ | |Twitter |https://twitter.com/CodAffection | 43 | | MEAN Stack |https://goo.gl/YJPPAH | | 44 | | C# Tutorial |https://goo.gl/s1zJxo | | 45 | | Asp.Net WebForm |https://goo.gl/GXC2aJ | | 46 | | C# WinForm |https://goo.gl/vHS9Hd | | 47 | | MS SQL |https://goo.gl/MLYS9e | | 48 | | Crystal Report |https://goo.gl/5Vou7t | | 49 | | CG Exercises in C Program |https://goo.gl/qEWJCs | | 50 | -------------------------------------------------------------------------------- /Angular7/src/app/payment-details/payment-detail/payment-detail.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 |
7 | 8 |
9 |
10 | 12 |
13 |
14 |
15 |
16 |
17 |
18 | 19 |
20 |
21 | 23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | 31 |
32 |
33 | 35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 | 46 |
47 |
48 |
49 |
50 | 51 |
52 |
-------------------------------------------------------------------------------- /WebAPI/WebAPI/Controllers/PaymentDetailController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.EntityFrameworkCore; 8 | using WebAPI.Models; 9 | 10 | namespace WebAPI.Controllers 11 | { 12 | [Route("api/[controller]")] 13 | [ApiController] 14 | public class PaymentDetailController : ControllerBase 15 | { 16 | private readonly PaymentDetailContext _context; 17 | 18 | public PaymentDetailController(PaymentDetailContext context) 19 | { 20 | _context = context; 21 | } 22 | 23 | // GET: api/PaymentDetail 24 | [HttpGet] 25 | public async Task>> GetPaymentDetails() 26 | { 27 | return await _context.PaymentDetails.ToListAsync(); 28 | } 29 | 30 | 31 | // PUT: api/PaymentDetail/5 32 | [HttpPut("{id}")] 33 | public async Task PutPaymentDetail(int id, PaymentDetail paymentDetail) 34 | { 35 | if(id!=paymentDetail.PMId) 36 | { 37 | return BadRequest(); 38 | } 39 | _context.Entry(paymentDetail).State = EntityState.Modified; 40 | 41 | try 42 | { 43 | await _context.SaveChangesAsync(); 44 | } 45 | catch (DbUpdateConcurrencyException) 46 | { 47 | if (!PaymentDetailExists(id)) 48 | { 49 | return NotFound(); 50 | } 51 | else 52 | { 53 | throw; 54 | } 55 | } 56 | 57 | return NoContent(); 58 | } 59 | 60 | // GET: api/PaymentDetail/5 61 | [HttpGet("{id}")] 62 | public async Task> GetPaymentDetail(int id) 63 | { 64 | var paymentDetail = await _context.PaymentDetails.FindAsync(id); 65 | 66 | if (paymentDetail == null) 67 | { 68 | return NotFound(); 69 | } 70 | 71 | return paymentDetail; 72 | } 73 | 74 | // POST: api/PaymentDetail 75 | [HttpPost] 76 | public async Task> PostPaymentDetail(PaymentDetail paymentDetail) 77 | { 78 | _context.PaymentDetails.Add(paymentDetail); 79 | await _context.SaveChangesAsync(); 80 | 81 | return CreatedAtAction("GetPaymentDetail", new { id = paymentDetail.PMId }, paymentDetail); 82 | } 83 | 84 | // DELETE: api/PaymentDetail/5 85 | [HttpDelete("{id}")] 86 | public async Task> DeletePaymentDetail(int id) 87 | { 88 | var paymentDetail = await _context.PaymentDetails.FindAsync(id); 89 | if (paymentDetail == null) 90 | { 91 | return NotFound(); 92 | } 93 | 94 | _context.PaymentDetails.Remove(paymentDetail); 95 | await _context.SaveChangesAsync(); 96 | 97 | return paymentDetail; 98 | } 99 | 100 | private bool PaymentDetailExists(int id) 101 | { 102 | return _context.PaymentDetails.Any(e => e.PMId == id); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /Angular7/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "arrow-return-shorthand": true, 7 | "callable-types": true, 8 | "class-name": true, 9 | "comment-format": [ 10 | true, 11 | "check-space" 12 | ], 13 | "curly": true, 14 | "deprecation": { 15 | "severity": "warn" 16 | }, 17 | "eofline": true, 18 | "forin": true, 19 | "import-blacklist": [ 20 | true, 21 | "rxjs/Rx" 22 | ], 23 | "import-spacing": true, 24 | "indent": [ 25 | true, 26 | "spaces" 27 | ], 28 | "interface-over-type-literal": true, 29 | "label-position": true, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-arg": true, 47 | "no-bitwise": true, 48 | "no-console": [ 49 | true, 50 | "debug", 51 | "info", 52 | "time", 53 | "timeEnd", 54 | "trace" 55 | ], 56 | "no-construct": true, 57 | "no-debugger": true, 58 | "no-duplicate-super": true, 59 | "no-empty": false, 60 | "no-empty-interface": true, 61 | "no-eval": true, 62 | "no-inferrable-types": [ 63 | true, 64 | "ignore-params" 65 | ], 66 | "no-misused-new": true, 67 | "no-non-null-assertion": true, 68 | "no-redundant-jsdoc": true, 69 | "no-shadowed-variable": true, 70 | "no-string-literal": false, 71 | "no-string-throw": true, 72 | "no-switch-case-fall-through": true, 73 | "no-trailing-whitespace": true, 74 | "no-unnecessary-initializer": true, 75 | "no-unused-expression": true, 76 | "no-use-before-declare": true, 77 | "no-var-keyword": true, 78 | "object-literal-sort-keys": false, 79 | "one-line": [ 80 | true, 81 | "check-open-brace", 82 | "check-catch", 83 | "check-else", 84 | "check-whitespace" 85 | ], 86 | "prefer-const": true, 87 | "quotemark": [ 88 | true, 89 | "single" 90 | ], 91 | "radix": true, 92 | "semicolon": [ 93 | true, 94 | "always" 95 | ], 96 | "triple-equals": [ 97 | true, 98 | "allow-null-check" 99 | ], 100 | "typedef-whitespace": [ 101 | true, 102 | { 103 | "call-signature": "nospace", 104 | "index-signature": "nospace", 105 | "parameter": "nospace", 106 | "property-declaration": "nospace", 107 | "variable-declaration": "nospace" 108 | } 109 | ], 110 | "unified-signatures": true, 111 | "variable-name": false, 112 | "whitespace": [ 113 | true, 114 | "check-branch", 115 | "check-decl", 116 | "check-operator", 117 | "check-separator", 118 | "check-type" 119 | ], 120 | "no-output-on-prefix": true, 121 | "use-input-property-decorator": true, 122 | "use-output-property-decorator": true, 123 | "use-host-property-decorator": true, 124 | "no-input-rename": true, 125 | "no-output-rename": true, 126 | "use-life-cycle-interface": true, 127 | "use-pipe-transform-interface": true, 128 | "component-class-suffix": true, 129 | "directive-class-suffix": true 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /Angular7/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ 22 | // import 'core-js/es6/symbol'; 23 | // import 'core-js/es6/object'; 24 | // import 'core-js/es6/function'; 25 | // import 'core-js/es6/parse-int'; 26 | // import 'core-js/es6/parse-float'; 27 | // import 'core-js/es6/number'; 28 | // import 'core-js/es6/math'; 29 | // import 'core-js/es6/string'; 30 | // import 'core-js/es6/date'; 31 | // import 'core-js/es6/array'; 32 | // import 'core-js/es6/regexp'; 33 | // import 'core-js/es6/map'; 34 | // import 'core-js/es6/weak-map'; 35 | // import 'core-js/es6/set'; 36 | 37 | /** 38 | * If the application will be indexed by Google Search, the following is required. 39 | * Googlebot uses a renderer based on Chrome 41. 40 | * https://developers.google.com/search/docs/guides/rendering 41 | **/ 42 | // import 'core-js/es6/array'; 43 | 44 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 45 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 46 | 47 | /** IE10 and IE11 requires the following for the Reflect API. */ 48 | // import 'core-js/es6/reflect'; 49 | 50 | /** 51 | * Web Animations `@angular/platform-browser/animations` 52 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 53 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 54 | **/ 55 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 56 | 57 | /** 58 | * By default, zone.js will patch all possible macroTask and DomEvents 59 | * user can disable parts of macroTask/DomEvents patch by setting following flags 60 | */ 61 | 62 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 63 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 64 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 65 | 66 | /* 67 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 68 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 69 | */ 70 | // (window as any).__Zone_enable_cross_context_check = true; 71 | 72 | /*************************************************************************************************** 73 | * Zone JS is required by default for Angular itself. 74 | */ 75 | import 'zone.js/dist/zone'; // Included with Angular CLI. 76 | 77 | 78 | /*************************************************************************************************** 79 | * APPLICATION IMPORTS 80 | */ 81 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/WebAPI.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Angular7/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "Angular7": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "prefix": "app", 11 | "schematics": {}, 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/Angular7", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "src/tsconfig.app.json", 21 | "assets": [ 22 | "src/favicon.ico", 23 | "src/assets" 24 | ], 25 | "styles": [ 26 | "src/styles.css", 27 | "node_modules/ngx-toastr/toastr.css" 28 | ], 29 | "scripts": [] 30 | }, 31 | "configurations": { 32 | "production": { 33 | "fileReplacements": [ 34 | { 35 | "replace": "src/environments/environment.ts", 36 | "with": "src/environments/environment.prod.ts" 37 | } 38 | ], 39 | "optimization": true, 40 | "outputHashing": "all", 41 | "sourceMap": false, 42 | "extractCss": true, 43 | "namedChunks": false, 44 | "aot": true, 45 | "extractLicenses": true, 46 | "vendorChunk": false, 47 | "buildOptimizer": true, 48 | "budgets": [ 49 | { 50 | "type": "initial", 51 | "maximumWarning": "2mb", 52 | "maximumError": "5mb" 53 | } 54 | ] 55 | } 56 | } 57 | }, 58 | "serve": { 59 | "builder": "@angular-devkit/build-angular:dev-server", 60 | "options": { 61 | "browserTarget": "Angular7:build" 62 | }, 63 | "configurations": { 64 | "production": { 65 | "browserTarget": "Angular7:build:production" 66 | } 67 | } 68 | }, 69 | "extract-i18n": { 70 | "builder": "@angular-devkit/build-angular:extract-i18n", 71 | "options": { 72 | "browserTarget": "Angular7:build" 73 | } 74 | }, 75 | "test": { 76 | "builder": "@angular-devkit/build-angular:karma", 77 | "options": { 78 | "main": "src/test.ts", 79 | "polyfills": "src/polyfills.ts", 80 | "tsConfig": "src/tsconfig.spec.json", 81 | "karmaConfig": "src/karma.conf.js", 82 | "styles": [ 83 | "src/styles.css" 84 | ], 85 | "scripts": [], 86 | "assets": [ 87 | "src/favicon.ico", 88 | "src/assets" 89 | ] 90 | } 91 | }, 92 | "lint": { 93 | "builder": "@angular-devkit/build-angular:tslint", 94 | "options": { 95 | "tsConfig": [ 96 | "src/tsconfig.app.json", 97 | "src/tsconfig.spec.json" 98 | ], 99 | "exclude": [ 100 | "**/node_modules/**" 101 | ] 102 | } 103 | } 104 | } 105 | }, 106 | "Angular7-e2e": { 107 | "root": "e2e/", 108 | "projectType": "application", 109 | "prefix": "", 110 | "architect": { 111 | "e2e": { 112 | "builder": "@angular-devkit/build-angular:protractor", 113 | "options": { 114 | "protractorConfig": "e2e/protractor.conf.js", 115 | "devServerTarget": "Angular7:serve" 116 | }, 117 | "configurations": { 118 | "production": { 119 | "devServerTarget": "Angular7:serve:production" 120 | } 121 | } 122 | }, 123 | "lint": { 124 | "builder": "@angular-devkit/build-angular:tslint", 125 | "options": { 126 | "tsConfig": "e2e/tsconfig.e2e.json", 127 | "exclude": [ 128 | "**/node_modules/**" 129 | ] 130 | } 131 | } 132 | } 133 | } 134 | }, 135 | "defaultProject": "Angular7" 136 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/WebAPI.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\profession\CodAffection\Asp.Net Core\Web API and Angular 7 CRUD\project\WebAPI\WebAPI\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\Shamseer\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.9.2 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.codeanalysis.analyzers\1.1.0 26 | C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools\2.2.0 27 | C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.razor.design\2.2.0 28 | 29 | -------------------------------------------------------------------------------- /WebAPI/.vs/config/applicationhost.config: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 |
80 |
81 | 82 |
83 |
84 |
85 |
86 |
87 |
88 | 89 |
90 |
91 |
92 |
93 |
94 | 95 |
96 |
97 |
98 | 99 |
100 |
101 | 102 |
103 |
104 | 105 |
106 |
107 |
108 | 109 | 110 |
111 |
112 |
113 |
114 |
115 |
116 | 117 |
118 |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | --------------------------------------------------------------------------------