Skip to content

Instantly share code, notes, and snippets.

View JIOO-phoeNIX's full-sized avatar

John Ojo JIOO-phoeNIX

View GitHub Profile
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]
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
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;
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
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Employee.DataAccess.Repository
{
public interface IEmployeeDAO
{
List<Model.Employee> GetAll();
using Microsoft.EntityFrameworkCore;
namespace Employee.DataAccess.Model
{
public class EmployeeManagementDBContext : DbContext
{
public EmployeeManagementDBContext(DbContextOptions<EmployeeManagementDBContext> options) : base(options)
{
}
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Employee.DataAccess.Model
{
public class Employee
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">BlazorWithML.NET</a>
<button class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<ul class="nav flex-column">
<li class="nav-item px-3">
@page "/BikeDemandForcast"
@using BlazorWithML.NET.Model
@using Newtonsoft.Json
@inject HttpClient Http
@inject NavigationManager NavigationManager
<h3>Bike Demand Forcast</h3>
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; }