Skip to content

hfrances/qckdev.Data.EntityFrameworkCore

Repository files navigation

NuGet Version Quality Gate Code Coverage Azure Pipelines Status

qckdev.Data.EntityFrameworkCore

Provides a default set of tools for EntityFramework.

using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Entities
{
    sealed class Test
    {

        public Guid TestId { get; set; }
        public string Name { get; set; }
        public int Factor { get; set; }
		public string Spaced { get; set; }

    }
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace qckdev.Data.EntityFrameworkCore.Test.Configuration
{
    
    sealed class TestConfiguration : IEntityTypeConfiguration<Entities.Test>
    {
        public void Configure(EntityTypeBuilder<Entities.Test> builder)
        {
            builder.HasKey(x => x.TestId);
            builder.Property(x => x.Spaced).HasMaxLength(20).IsFixedLength().TrimEnd();
        }
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages