This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Employee.DataAccess.Repository; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
using System.Threading.Tasks; | |
using System; | |
namespace Employee.API.Controllers | |
{ | |
[Route("api/[controller]")] | |
[ApiController] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Logging": { | |
"LogLevel": { | |
"Default": "Information", | |
"Microsoft": "Warning", | |
"Microsoft.Hosting.Lifetime": "Information" | |
} | |
}, | |
"AllowedHosts": "*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Employee.DataAccess.Model; | |
using Employee.DataAccess.Repository; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.OpenApi.Models; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Employee.DataAccess.Model; | |
using Microsoft.EntityFrameworkCore; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace Employee.DataAccess.Repository | |
{ | |
public class EmployeeDAO : IEmployeeDAO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace Employee.DataAccess.Repository | |
{ | |
public interface IEmployeeDAO | |
{ | |
List<Model.Employee> GetAll(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore; | |
namespace Employee.DataAccess.Model | |
{ | |
public class EmployeeManagementDBContext : DbContext | |
{ | |
public EmployeeManagementDBContext(DbContextOptions<EmployeeManagementDBContext> options) : base(options) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace Employee.DataAccess.Model | |
{ | |
public class Employee | |
{ | |
[Key] | |
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/BikeDemandForcast" | |
@using BlazorWithML.NET.Model | |
@using Newtonsoft.Json | |
@inject HttpClient Http | |
@inject NavigationManager NavigationManager | |
<h3>Bike Demand Forcast</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
namespace BlazorWithML.NET.Model | |
{ | |
public class BikeForcastInput | |
{ | |
[Required(ErrorMessage = "Number of years to predict is required.")] | |
[Range(minimum: 1, maximum: 500, ErrorMessage = "Range of values allowed are 1 - 500")] | |
public int numberOfDaysToPredict { get; set; } |