1. Fibonacci Series int a = 0; int b = 1; int target = 55; FibonacciSeries1(a, b, target); static int FibonacciSeries1(int a, int b, int target) { /*usign for loop*/ int result = 0; for (int i = 0; i < target; i++) { result = a + b; Console.WriteLine(a + "+" + b + "=" + result); a = b; b…
Read more1. appsetting.json file "ConnectionStrings": { "DefaultConnection":"Server=ZIAUL; Database=AkijBashir; Trusted_Connection=True;MultipleActiveResultSets=true" }, "AllowedHosts": "*", "JWT": { "ValidAudience": "http://localhost:4200", "ValidIssuer": "http://loca…
Read more1. Install Dapper from the Nuget package manager console 2. Create a dapper context file example: public class DapperContext { private readonly IConfiguration _configuration; private readonly string _connectionString; public DapperContext(IConfiguration configuration) { _configuration = configuration; _connectionString = _c…
Read moreGo to your controller and add some dependency in your code. Note: Must add this middleware in the startup.cs file builder.Services.AddHttpClient(); private readonly IHttpClientFactory _httpClientFactory; public HomeController(IHttpClientFactory httpClientFactory) { _httpClientFactory = httpClientFacto…
Read more1. Create a new project asp.net core with MVC (model view controller) 2. Install 3 packeges a. Microsoft.EntityFrameworkCore b. Microsoft.EntityFrameworkCore.SqlServer c. Microsoft.EntityFrameworkCore.Tools 3. go to the program.cs if you are version 6 or a startup.cs if used under version 6 and add some features for performing it. builder.S…
Read more1. Model Design export class Student { id : number = 0 ; name : string = '' ; departmentId : number = 0 ; image : string = '' ; } 2. Reactive Form Design < form [formGroup] = "studentForm" (ngSubmit) = create(studentForm.value) > < label for = "department-name" > Department: <…
Read more
Social Plugin