This repository has been archived on 2024-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
Cinemateket/backend/Models/db/MovieDB.cs
haraldnilsen 0fdc0e6af5 🗃️ automatically add data to db when running backend
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
2023-09-18 15:23:20 +02:00

33 lines
No EOL
581 B
C#

#nullable disable
using Microsoft.EntityFrameworkCore;
using CsvHelper.Configuration;
using System.Globalization;
namespace backend;
// [PrimaryKey(nameof(Id))]
public class MovieDB
{
public int Id { get; set; }
public string Title { get; set; }
public string Year { get; set; }
public string imdbID { get; set; }
public string Type { get; set; }
public string Poster { get; set; }
}
public class MovieDBMap : ClassMap<MovieDB>
{
public MovieDBMap()
{
AutoMap(CultureInfo.InvariantCulture);
Map(m => m.Id).Ignore();
}
}