Create a New ASP.NET Core MVC Web application. Create a New Database in App_Data Folder WPLTASKDB. Create Three Tables in your Database
Patient -> PatientID (PK), PatientName, Age, DateofAdmission
PatientDetail -> PatientId(PK), DiseaseID(PK)
Disease -> DiseaseID (PK), DiseaseName, Medications, Symptoms
Create Three Controller in your Website, by using Patient Controller your Application should be able to Add, Update, Delete and View All Patient, by using Disease Controller your Application should be able to Add, Update, Delete and View All Disease, by using PatientDetail Controller your Application should be able to Add, Update, Delete and View All PatientDetail
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BlipDrop.Models
{
public class Customer
{
[Key]
[Column(Order = 1)]
public Guid CustomerID { get; set; }
[Required]
[MaxLength(128)]
public string CustomerName { get; set; }
[Required]
[MaxLength(3)]
public string CountryIso3 { get; set; }
[MaxLength(3)]
public string RegionCode { get; set; }
public virtual Country Country { get; set; }
public virtual Region Region { get; set; }
}
}
Comments
Leave a comment