Save image metadata to database

This commit is contained in:
Astrian Zheng 2023-10-19 10:35:18 +11:00
parent fbcebd47d9
commit ce5f7a5d8c
2 changed files with 2 additions and 0 deletions

View File

@ -473,6 +473,7 @@ namespace FIT5032_Assignment.Controllers {
file = fileName, file = fileName,
status = 0, status = 0,
}; };
db.Images.Add(dbImage);
// Change appointment status to 2 // Change appointment status to 2
appointment.status = 2; appointment.status = 2;
db.Entry(appointment).State = EntityState.Modified; db.Entry(appointment).State = EntityState.Modified;

View File

@ -52,6 +52,7 @@ namespace FIT5032_Assignment.Controllers {
public DbSet<Patients> Patients { get; set; } public DbSet<Patients> Patients { get; set; }
public DbSet<Doctors> Doctors { get; set; } public DbSet<Doctors> Doctors { get; set; }
public DbSet<Appointments> Appointments { get; set; } public DbSet<Appointments> Appointments { get; set; }
public DbSet<Images> Images { get; set; }
} }
public class HomeController : Controller { public class HomeController : Controller {
public static string GetMd5Hash(string input) { public static string GetMd5Hash(string input) {