我正在尝试将Postgresql与Entity Framework Core一起使用。但是我对性能有疑问。
当我简单地直接向Postgresql调用相同的SQL时,它在1毫秒内运行,但是在Entity Framework中运行在〜120毫秒内。因此,速度要慢120倍。
这是示例查询
SELECT COUNT(*)::INT
FROM "Campaign" AS x
WHERE x."UserId" = @__userId_0
此SQL查询在1毫秒内运行:
这是同一查询的Entity Framework Core调试结果,需要133毫秒
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (133ms) [Parameters=[@__userId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*)::INT
FROM "Campaign" AS x
WHERE x."UserId" = @__userId_0
这是怎么了?
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.2.0-rtm-35687 initialized 'PostgreSqlContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__ipNumber_0='?' (DbType = Double)], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."CityName", x."CountryCode", x."CountryName", x."IpFrom", x."IpTo", x."RegionName"
FROM "IpLocation" AS x
WHERE (@__ipNumber_0 > x."IpFrom") AND (@__ipNumber_0 < x."IpTo")
LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (133ms) [Parameters=[@__ipNumber_0='?' (DbType = Double)], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."CityName", x."CountryCode", x."CountryName", x."IpFrom", x."IpTo", x."RegionName"
FROM "IpLocation" AS x
WHERE (@__ipNumber_0 > x."IpFrom") AND (@__ipNumber_0 < x."IpTo")
LIMIT 1
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'IpLocation' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."ApiToken", x."BirthDate", x."CountryId", x."CreatedAt", x."DeletedAt", x."Email", x."EmailVerify", x."FacebookId", x."GoogleId", x."Image", x."InvoicePaymentFailCount", x."LastLoginAt", x."LoginErrorCount", x."Name", x."Password", x."PaymentStatus", x."PlanId", x."ResetPasswordToken", x."SelectedLanguageCode", x."ShopifyToken", x."Status", x."StripeId", x."Surname", x."Type", x."UpdatedAt"
FROM "User" AS x
WHERE x."Id" = @__id_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (134ms) [Parameters=[@__id_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."ApiToken", x."BirthDate", x."CountryId", x."CreatedAt", x."DeletedAt", x."Email", x."EmailVerify", x."FacebookId", x."GoogleId", x."Image", x."InvoicePaymentFailCount", x."LastLoginAt", x."LoginErrorCount", x."Name", x."Password", x."PaymentStatus", x."PlanId", x."ResetPasswordToken", x."SelectedLanguageCode", x."ShopifyToken", x."Status", x."StripeId", x."Surname", x."Type", x."UpdatedAt"
FROM "User" AS x
WHERE x."Id" = @__id_0
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'User' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__get_Item_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT e."Id", e."CreatedAt", e."DeletedAt", e."Description", e."DisplayCount", e."ImpressionCount", e."InteractionCount", e."Name", e."PopupCount", e."Price", e."StripeId", e."Type", e."UpdatedAt"
FROM "Plan" AS e
WHERE e."Id" = @__get_Item_0
LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (134ms) [Parameters=[@__get_Item_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT e."Id", e."CreatedAt", e."DeletedAt", e."Description", e."DisplayCount", e."ImpressionCount", e."InteractionCount", e."Name", e."PopupCount", e."Price", e."StripeId", e."Type", e."UpdatedAt"
FROM "Plan" AS e
WHERE e."Id" = @__get_Item_0
LIMIT 1
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'Plan' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__userId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*)::INT
FROM "Campaign" AS x
WHERE x."UserId" = @__userId_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (133ms) [Parameters=[@__userId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*)::INT
FROM "Campaign" AS x
WHERE x."UserId" = @__userId_0
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__userId_0='?' (DbType = Int32), @__startDate_1='?' (DbType = DateTime), @__endDate_2='?' (DbType = DateTime)], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*)::INT
FROM "Impression" AS x
WHERE ((x."UserId" = @__userId_0) AND (x."CreatedAt" > @__startDate_1)) AND (x."CreatedAt" < @__endDate_2)
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (134ms) [Parameters=[@__userId_0='?' (DbType = Int32), @__startDate_1='?' (DbType = DateTime), @__endDate_2='?' (DbType = DateTime)], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*)::INT
FROM "Impression" AS x
WHERE ((x."UserId" = @__userId_0) AND (x."CreatedAt" > @__startDate_1)) AND (x."CreatedAt" < @__endDate_2)
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__userId_0='?' (DbType = Int32), @__domain_1='?', @__Replace_2='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."CampaignGoalId", x."CreatedAt", x."DeletedAt", x."JsonData", x."Name", x."Status", x."UpdatedAt", x."UserId"
FROM "Campaign" AS x
WHERE ((x."UserId" = @__userId_0) AND (x."Status" = TRUE)) AND EXISTS (
SELECT 1
FROM "CampaignDomainRelation" AS y
INNER JOIN "Domain" AS "y.Domain" ON y."DomainId" = "y.Domain"."Id"
WHERE ((("y.Domain"."Url" = @__domain_1) OR ((('www.' || "y.Domain"."Url")) = @__domain_1)) OR ("y.Domain"."Url" = @__Replace_2)) AND (x."Id" = y."CampaignId"))
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (134ms) [Parameters=[@__userId_0='?' (DbType = Int32), @__domain_1='?', @__Replace_2='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."CampaignGoalId", x."CreatedAt", x."DeletedAt", x."JsonData", x."Name", x."Status", x."UpdatedAt", x."UserId"
FROM "Campaign" AS x
WHERE ((x."UserId" = @__userId_0) AND (x."Status" = TRUE)) AND EXISTS (
SELECT 1
FROM "CampaignDomainRelation" AS y
INNER JOIN "Domain" AS "y.Domain" ON y."DomainId" = "y.Domain"."Id"
WHERE ((("y.Domain"."Url" = @__domain_1) OR ((('www.' || "y.Domain"."Url")) = @__domain_1)) OR ("y.Domain"."Url" = @__Replace_2)) AND (x."Id" = y."CampaignId"))
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'Campaign' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__8__locals1_location_CountryCode_0='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."Code", x."CreatedAt", x."DeletedAt", x."Name", x."UpdatedAt"
FROM "Country" AS x
WHERE x."Code" = @__8__locals1_location_CountryCode_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (132ms) [Parameters=[@__8__locals1_location_CountryCode_0='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."Code", x."CreatedAt", x."DeletedAt", x."Name", x."UpdatedAt"
FROM "Country" AS x
WHERE x."Code" = @__8__locals1_location_CountryCode_0
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'Country' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__country_Id_0='?' (DbType = Int32), @__8__locals1_location_RegionName_1='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."CountryId", x."CreatedAt", x."DeletedAt", x."Name", x."UpdatedAt"
FROM "City" AS x
WHERE (x."CountryId" = @__country_Id_0) AND (x."Name" = @__8__locals1_location_RegionName_1)
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (133ms) [Parameters=[@__country_Id_0='?' (DbType = Int32), @__8__locals1_location_RegionName_1='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."CountryId", x."CreatedAt", x."DeletedAt", x."Name", x."UpdatedAt"
FROM "City" AS x
WHERE (x."CountryId" = @__country_Id_0) AND (x."Name" = @__8__locals1_location_RegionName_1)
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'City' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@__countryCode_0='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."Code", x."CreatedAt", x."DeletedAt", x."Name", x."UpdatedAt"
FROM "Country" AS x
WHERE x."Code" = @__countryCode_0
LIMIT 1
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (132ms) [Parameters=[@__countryCode_0='?'], CommandType='Text', CommandTimeout='30']
SELECT x."Id", x."Code", x."CreatedAt", x."DeletedAt", x."Name", x."UpdatedAt"
FROM "Country" AS x
WHERE x."Code" = @__countryCode_0
LIMIT 1
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10808]
'PostgreSqlContext' generated a temporary value for the 'Id' property of new 'Impression' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
Context 'PostgreSqlContext' started tracking 'Impression' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
DetectChanges starting for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
DetectChanges completed for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
DetectChanges starting for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
DetectChanges completed for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
DetectChanges starting for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
DetectChanges completed for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.Update[10004]
SaveChanges starting for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
DetectChanges starting for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
DetectChanges completed for 'PostgreSqlContext'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
Opening connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
Opened connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20200]
Beginning transaction with isolation level 'ReadCommitted'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
Executing DbCommand [Parameters=[@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = DateTime), @p3='?' (DbType = DateTime), @p4='?', @p5='?' (DbType = DateTime), @p6='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
INSERT INTO "Impression" ("CampaignId", "CountryId", "CreatedAt", "DeletedAt", "SessionId", "UpdatedAt", "UserId")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
RETURNING "Id";
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (133ms) [Parameters=[@p0='?' (DbType = Int32), @p1='?' (DbType = Int32), @p2='?' (DbType = DateTime), @p3='?' (DbType = DateTime), @p4='?', @p5='?' (DbType = DateTime), @p6='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
INSERT INTO "Impression" ("CampaignId", "CountryId", "CreatedAt", "DeletedAt", "SessionId", "UpdatedAt", "UserId")
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
RETURNING "Id";
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10803]
Foreign key property 'Impression.Id' detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
A data reader was disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20202]
Committing transaction.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
Closing connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
Closed connection to database 'postgres' on server 'tcp://my-db-connection'.
dbug: Microsoft.EntityFrameworkCore.Database.Transaction[20204]
Disposing transaction.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10807]
An 'Impression' entity tracked by 'PostgreSqlContext' changed from 'Added' to 'Unchanged'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Update[10005]
SaveChanges completed for 'PostgreSqlContext' with 1 entities written to the database.
dbug: Microsoft.EntityFrameworkCore.Infrastructure[10407]
'PostgreSqlContext' disposed.
这是我的Campaign
模型班:
using System;
using System.Collections.Generic;
namespace Model.Models
{
public partial class Campaign
{
public Campaign()
{
CampaignDomainRelation = new HashSet<CampaignDomainRelation>();
CampaignFormData = new HashSet<CampaignFormData>();
Display = new HashSet<Display>();
Domain = new HashSet<Domain>();
Impression = new HashSet<Impression>();
Interaction = new HashSet<Interaction>();
}
public int Id { get; set; }
public int? UserId { get; set; }
public string Name { get; set; }
public int? CampaignGoalId { get; set; }
public string JsonData { get; set; }
public bool? Status { get; set; }
public DateTime? CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public DateTime? DeletedAt { get; set; }
public virtual CampaignGoal CampaignGoal { get; set; }
public virtual User User { get; set; }
public virtual ICollection<CampaignDomainRelation> CampaignDomainRelation { get; set; }
public virtual ICollection<CampaignFormData> CampaignFormData { get; set; }
public virtual ICollection<Display> Display { get; set; }
public virtual ICollection<Domain> Domain { get; set; }
public virtual ICollection<Impression> Impression { get; set; }
public virtual ICollection<Interaction> Interaction { get; set; }
}
}