小编krl*_*rlm的帖子

EF Core - 在没有源的情况下运行迁移 - 相当于EF6的migrate.exe

是否可以从包含迁移和dbcontext的DLL运行ef迁移?我想dotnet ef database update在不需要project.json和源代码的情况下运行我的构建工件.

换句话说,我正在寻找EF6 的migrate.exe https://msdn.microsoft.com/en-us/data/jj618307.aspx

.net entity-framework .net-core

8
推荐指数
2
解决办法
3673
查看次数

如何在Delphi WebService中公开复杂类型

我在通过SOAP WebService公开DTO类时遇到了问题.

我的班级看起来像

TKontrahent = class
public
    Imie : string;
    Nazwisko : string;
    Id : integer;
end; 
Run Code Online (Sandbox Code Playgroud)

这是服务的代码:

TKontrahentService = class(TInvokableClass, IKontrahentService)
public
    function Dodaj( kontrahnet : TKontrahent)  : integer; stdcall;
    function Aktualizuj ( kontrahent : TKontrahent) : integer; stdcall;
    function Usun ( kontrahent : TKontrahent) : integer; stdcall;
    function Nowy : TKontrahent; stdcall;
end;
Run Code Online (Sandbox Code Playgroud)

以及如何在WSDL中发布类型:

<types>
  <xs:schema targetNamespace="urn:Kontrahent" xmlns="urn:Kontrahent">
    <xs:complexType name="TKontrahent">
      <xs:sequence/>
    </xs:complexType>
  </xs:schema>
</types>
Run Code Online (Sandbox Code Playgroud)

我会感谢任何建议.我找不到任何更复杂类型的样本.最好的问候,krlm

delphi soap types complextype

5
推荐指数
1
解决办法
2102
查看次数

打字稿不会生成未引用的成员

TypeScript 编译器生成的 JS 代码有问题。对于这样的类:

// Class
export class UserDTO {
    Id: number;
    FirstName: string;
    LastName: string;
    DateOfBirth: Date;

    getFUllName(): string {
        return this.FirstName + ' ' + this.LastName;
    }        
}
Run Code Online (Sandbox Code Playgroud)

TypeScript 生成以下代码:

define(["require", "exports"], function(require, exports) {
    // Class
    var UserDTO = (function () {
        function UserDTO() {
        }
        UserDTO.prototype.getFUllName = function () {
            return this.FirstName + ' ' + this.LastName;
        };
        return UserDTO;
    })();
    exports.UserDTO = UserDTO;
});
//@ sourceMappingURL=TestClass.js.map
Run Code Online (Sandbox Code Playgroud)

上面的代码不包含未使用(未引用)的字段,但我在某些“对象到对象”映射案例中需要它们。是否可以强制编译器始终生成它们?

我使用的是 Visual Studio 2012 的 TypeScript 0.9.1。这是我的编译器选项:

<TypeScriptTarget>ES5</TypeScriptTarget> …
Run Code Online (Sandbox Code Playgroud)

javascript knockout-mapping-plugin typescript

2
推荐指数
1
解决办法
247
查看次数