ultimate/Repository/Configuration/EmployeeConfiguration.cs

65 lines
2.5 KiB
C#
Raw Normal View History

2023-06-12 10:26:01 +02:00
// ***********************************************************************
// Assembly : Repository
// Author : frede
// Created : 2023 06 11 10:00
//
// Last Modified By : frede
// Last Modified On : 2023 06 11 10:00
// ***********************************************************************
// <copyright file="EmployeeConfiguration.cs" company="FCS">
// Copyright (C) 2023-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
using Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Repository.Configuration;
public class EmployeeConfiguration : IEntityTypeConfiguration<Employee>
{
public void Configure(EntityTypeBuilder<Employee> builder)
{
builder.HasData
(
new Employee
{
EmployeeId = new Guid("12341234-1111-eeee-eeee-aaaabbbbcccc"),
Name = "Sam Raiden",
Age = 26,
Position = "Software developer",
CompanyId = new Guid("12341234-aaaa-eeee-eeee-aaaabbbbcccc")
},
new Employee
{
EmployeeId = new Guid("12341234-2222-eeee-eeee-aaaabbbbcccc"),
Name = "Jana McLeaf",
Age = 30,
Position = "Software developer",
CompanyId = new Guid("12341234-aaaa-eeee-eeee-aaaabbbbcccc")
},
new Employee
{
EmployeeId = new Guid("56785678-1111-eeee-eeee-aaaabbbbcccc"),
Name = "Kane Miller",
Age = 35,
Position = "Administrator",
CompanyId = new Guid("56785678-aaaa-eeee-eeee-aaaabbbbcccc")
}
);
}
}