Adel
❔ Update sql code not working
and here is my controller, my insert works fine my delete works great but updating doesn't work i am not sure if the issue is because of image but maybe someone can see something I can't
when clicking on update it updates the page with the new numbers but now the database.
Thank you 😄
6 replies
❔ Select statement to view in html
This is my models
public class Carinformation
{
public int ID { get; set; }
public string Title { get; set; }
public decimal? Price { get; set; }
public int? Miles { get; set; }
public string? VinNumber { get; set; }
public decimal? MilesPerGallon { get; set; }
public string? Engine { get; set; }
public string? Color { get; set; }
public string? DriveType { get; set; }
public string? Transmission { get; set; }
public byte[]? Image { get; set; }
public int? Year { get; set; }
}
public class CarImage
{
public int ID { get; set; }
public int CarInformationID { get; set; }
public byte[]? Image { get; set; }
}
My tables are getting inserted correctly
Ex: Car Id is 1 will have all the details
Car Id 1 in carimage would have 3 rows for the 3 uploaded images
Now when joining how could I show them all in 1 row?
or do i need to make separate queries because I can't figure out a way to show them in my html
Note: My select statement is obviously wrong just wanted to keep it simple and also I dont have image from carimage in this code as well.
3 replies