我开始使用EF Code First和MVC,我有点难过.我有以下数据库结构(很抱歉,我不允许发布图片):
表 - 产品
表 - 相关产品
Products.ProductID上的1-Many - > RelatedProducts.ProductID
1 - Products.ProductID上的很多 - > RelatedProducts.RelatedProductID
基本上我有一个产品,可以有一系列与之相关的产品.它们保存在RelatedProducts表中,其中包含ProductID和相关产品的ProductID定义的关系,我将其命名为RelatedProductID.在我的代码中,我生成了以下类:
public class MyDBEntities : DbContext
{
public DbSet<Product> Products { get; set; }
public DbSet<RelatedProduct> RelatedProducts { get; set; }
}
public class Product
{
public Guid ProductID { get; set; }
public string Name { get; set; }
public string Heading { get; set; }
public string Description { get; set; }
public decimal Price { get; set; } …
Run Code Online (Sandbox Code Playgroud) many-to-many entity-framework-4 self-reference entity-framework-ctp5
我有生产力电动工具,并设置了高光当前线选项,并在字体和颜色部分将颜色设置为蓝色.但是,每次我启动VS时,线条高亮显示为白色,只有在我转到工具 - >选项 - >字体和颜色并点击确定后才会更改.任何人都知道这是为什么它会变得非常烦人!
我正在尝试为WiX和Burn 创建自定义UI .我已经按照我发现的一些指南进行了操作,到目前为止,我有一个项目具有以下内容,它继承自BootstrapperApplication.
namespace MyBA
{
public class TestBA : BootstrapperApplication
{
protected override void Run()
{
MessageBox.Show("My BA is running");
this.Engine.Quit(0);
}
}
}
Run Code Online (Sandbox Code Playgroud)
在AssemblyInfo.cs中:
[assembly: BootstrapperApplication(typeof(TestBA))]
Run Code Online (Sandbox Code Playgroud)
然后在我的Bootstrapper项目中,我有以下内容.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="MyApplication"
Version="1.0.0"
Manufacturer="Acme Ltd"
UpgradeCode="F84A4058-FDF6-4218-BCB5-12C811DA3C99"
Condition="NOT ((VersionNT = 600 AND ServicePackLevel >=2) OR (VersionNT >= 601))"
IconSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logo.ico"
SplashScreenSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Splashscreen.bmp"
DisableRepair="no"
DisableRemove="no"
DisableModify="no">
<WixVariable Id="WixMbaPrereqPackageId"
Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl"
Value="NetfxLicense.rtf" />
<WixVariable Id="WixStdbaLicenseRtf"
Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Licence.en-gb.rtf" />
<WixVariable Id="WixStdbaLogo"
Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logoInstallSmall.bmp" />
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload Name='BootstrapperCore.config'
SourceFile='$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Bootstrapper\MyBA.BootstrapperCore.config' …
Run Code Online (Sandbox Code Playgroud)