Skip to content

Instantly share code, notes, and snippets.

View AbhinavPradeep's full-sized avatar

Abhinav Pradeep AbhinavPradeep

View GitHub Profile
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
namespace Theta.Customers.API
{
public class Program
{
public static void Main(string[] args)
{
using MongoDB.Driver;
using System.Collections.Generic;
using System.Linq;
using Theta.Customers.Models;
namespace Theta.Customers.Repository
{
public class CustomerRepos
{
namespace Theta.Customers.Models
{
public class Address
{
public string Country;
public string State;
public string Area;
public string Street;
public int HouseNum;
}
namespace Theta.Customers.Models
{
public class Customer
{
public int _id;
public string FirstName;
public string LastName;
//public bool IsPremium;
public Address Address;
}
namespace Theta.Customers.Models
{
public class Customer
{
public int _id;
public string FirstName;
public string LastName;
//public bool IsPremium;
public Address Address;
}
namespace Theta.Customers.Models
{
public class Customer
{
public int _id;
public string FirstName;
public string LastName;
//public bool IsPremium;
public Address Address;
}
namespace Theta.Customers.Models
{
public class Customer
{
public int _id;
public string FirstName;
public string LastName;
//public bool IsPremium;
public Address Address;
}
private Node CreateNode(Person person)
{
Node node = new Node();
node.person = person;
node.Next = null;
return node;
}
public void Add(Person person)
{
Node node = CreateNode(person);
if (Head == null)
{
Head = node;
return;
}
if(Head.Next == null)
{
Node Head;
public LinkedList()
{
Head = null;
}