57c41c7a60
- fix naming DbModels
29 lines
893 B
C#
29 lines
893 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using MP.FileData.DbModels;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MP.FileData
|
|
{
|
|
public static class ModelBuilderExtensions
|
|
{
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// Estensione per seed iniziale dei dati nel DB
|
|
/// </summary>
|
|
/// <param name="modelBuilder"></param>
|
|
public static void Seed(this ModelBuilder modelBuilder)
|
|
{
|
|
// inizializzazione dei valori di default x MACCHINA
|
|
modelBuilder.Entity<ArchMaccModel>().HasData(
|
|
new ArchMaccModel { IdxMacchina = "0", RuleName = "0", Descrizione = "--- Tutte ---", Nome = "--- Tutte ---", BasePath = "", ImgUrl = "", Note = "", ShowOrder = 0 }
|
|
);
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |