Skip to content

Instantly share code, notes, and snippets.

View JIOO-phoeNIX's full-sized avatar

John Ojo JIOO-phoeNIX

View GitHub Profile
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">GraphQLSampleAppUI</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 "/CreateEmployee"
@using GraphQLSampleAppUI.DataAccess;
@using GraphQLSampleAppUI.DataAccess.Model;
@inject NavigationManager NavigationManager
<h1>Create An Employee</h1>
@page "/ViewEmployee/{Id:int}"
@using GraphQLSampleAppUI.DataAccess;
@using GraphQLSampleAppUI.DataAccess.Model;
@inject NavigationManager NavigationManager
@if (employee.Name == null)
@page "/EmployeeView"
@using GraphQLSampleAppUI.DataAccess;
@using GraphQLSampleAppUI.DataAccess.Model;
@inject NavigationManager NavigationManager
<h1>All Employee</h1>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace GraphQLSampleAppUI.DataAccess.Model
{
public class CreateEmployeeReturnModel
{
public int DepartmentId { get; set; }
using System;
using System.ComponentModel.DataAnnotations;
namespace GraphQLSampleAppUI.DataAccess.Model
{
public class CreateEmployeeModel
{
[Required(ErrorMessage = "Name is required")]
public string Name { get; set; }
using System.Collections.Generic;
namespace GraphQLSampleAppUI.DataAccess.Model
{
public class Department
{
public int DepartmentId { get; set; }
public string Name { get; set; }
namespace GraphQLSampleAppUI.DataAccess.Model
{
public class Employee
{
public int EmployeeId { get; set; }
public string Name { get; set; }
public string Email { get; set; }
using GraphQL;
using GraphQL.Client.Http;
using GraphQL.Client.Serializer.Newtonsoft;
using ModernHttpClient;
using Newtonsoft.Json;
using System;
using System.Threading.Tasks;
namespace GraphQLSampleAppUI.DataAccess
{
using GraphQL;
using GraphQL.Client.Http;
using ModernHttpClient;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using GraphQL.Client.Serializer.Newtonsoft;
using Newtonsoft.Json;