Blame view

Vrh.Web.OneReport.Lib/DbModels/Mapping/QuerySettingsSetMap.cs 1.2 KB
ab9f2fbe   Schwirg László   Add project files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  using System;
  using System.Collections.Generic;
  using System.Data.Entity.ModelConfiguration;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace Vrh.OneReport.Lib.Areas.OneReport.DbModels.Mapping
  {
      public class QuerySettingsSetMap : EntityTypeConfiguration<QuerySettingsSet>
      {
          public QuerySettingsSetMap()
          {
              // Primary Key
              this.HasKey(t => t.Id);
  
              // Properties
              this.Property(t => t.User)
                  .IsRequired();
  
              this.Property(t => t.Query)
                  .IsRequired();
  
              this.Property(t => t.Name)
                  .IsRequired();
  
              // Table & Column Mappings
              this.ToTable("QuerySettingsSet");
              this.Property(t => t.Id).HasColumnName("Id");
              this.Property(t => t.User).HasColumnName("User");
              this.Property(t => t.Query).HasColumnName("Query");
              this.Property(t => t.Name).HasColumnName("Name");
              this.Property(t => t.FieldFilters).HasColumnName("FieldFilters");
              this.Property(t => t.Settings).HasColumnName("Settings");
              this.Property(t => t.Filters).HasColumnName("Filters");
          }
      }
  }