Skip to main content

Richard Webb

Richard Webb's Public Library

  • wherever we change to a new route via $location.path('/my/new/route'), we execute some extra code to clear out the HTML in the prior view using:

    kendo.destroy(document.body); $('.view-root-node').html('');

  • to update the data source


  • Figured this out with help from post by LeftyX on Jun 29: Move this LOC app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll); to the FIRST LINE in the ConfigureAuth method of Startup.Auth.cs. Then, REMOVE this LOC context.OwinContext.Response.Headers.Add("Access-Control-Allow-Origin", new[] { "*" }); from the GrantResourceOwnerCredentials() method of ApplicationOAuthProvide.cs. Preflight CORS-request them gets handled properly, and then the actual requet goes through.  –   FancyNancy  Nov 18 '14 at 13:24

  • You need to enable CORS in your Web API. The easier and preferred way to enable CORS globally is to add the following into web.config

    <system.webServer>   <httpProtocol>     <customHeaders>       <add name="Access-Control-Allow-Origin" value="*" />       <add name="Access-Control-Allow-Headers" value="Content-Type" />       <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />     </customHeaders>   </httpProtocol> </system.webServer>

  • Configuring a Composite Foreign Key

    If the primary key on the Department type consisted of DepartmentID and Name properties, you would configure the primary key for the Department and the foreign key on the Course types as follows:

    // Composite primary key 
    .HasKey(d => new { d.DepartmentID, d.Name }); 
    // Composite foreign key 
        .HasRequired(c => c.Department)  
        .WithMany(d => d.Courses) 
        .HasForeignKey(d => new { d.DepartmentID, d.DepartmentName });

1 - 20 of 4486 Next › Last »
20 items/page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo