Welcome to MSDN Blogs Sign in | Join | Help

Migrating from LINQ To SQL to the Entity Framework

Since the release of the Entity Framework, Microsoft got a number of requests for details and best practices from customers who are looking at migrating their LINQ to SQL based applications to the Entity Framework.  In order to address this topic, the ADO.NET Team Blog started a new series of blogs posts that will look at various aspects of migration. The first post is about Eager Loading in LINQ To SQL.

If you are new to the Entity Framework, next week, in Wallisellen, we are running a half-day Hands-On Lab on this specific topic. The lab wants to be an introduction for developers investigating the use of the ADO.NET Entiy Framework. For more information please refer to the following Registration page.

Posted by kcasada | 1 Comments
Filed under: ,

Parallel Extensions part of the .NET Framework 4.0

Friday, last week, the Parallel Computing Platform team at Microsoft announced that the Parallel Extensions will be part of the .NET Framework 4.0. Not only will be part of it, but it will be a core part of it.

So you will find the Task Parallel Library sitting in mscorlib.dll and PLINQ in system.core.dll, which is a good news because by integrating everything in the .NET core, you do not have to be concerned from a deployment and versioning perspective.

If you want to have more information on this topic, the October 2008 issue of MSDN Magazine is just full of content on parallelism, sign that the days of exponential increases in CPU speed are gone J.

Posted by kcasada | 1 Comments
Filed under: ,

Microsoft Search Server 2008 Express + Hardware = swissbox

Die swissbox ermöglicht es, innerhalb von 1 Stunde, Unternehmenssuche Realität werden zu lassen. Die swissbox ist ein Windows Server inkl. Hardware, auf dem Microsoft Search Server 2008 Express (MSSE) installiert ist.

MSSE erlaubt es, mehrere bestehende Fileshares und SharePoint sites zu indexieren. Durch den erstellen Index funktioniert die Suche blitzschnell. Da MSSE auf WSS 3.0 aufsetzt, steht durch den Einsatz der swissbox zusätzlich die Windows SharePoint Services Collaboration Lösung zur Verfügung.

Weitere Infos zur swissbox: http://www.swissbox.ch.

Weitere Infos zum Microsoft Search Server 2008 Express: http://www.microsoft.com/enterprisesearch/serverproducts/searchserverexpress/default.aspx.

Posted by Olaf | 1 Comments

Zusammenführung von VSTS Development Edition und VSTS Database Edition

Some good news :) 

 

Die Funktionen und Features die beiden Rollen Visual Studio Team System Development Edition und Visual Studio Team System Database Edition werden im nächsten VSTS-Release (Code-Name „Rosario“) in einer gemeinsamen Edition zusammengeführt.

 

Damit Kunden schon heute von dieser künftigen Zusammenführung profitieren können, werden ab dem 1.Oktober 2008 alle Software Assurance Kunden von Visual Studio Team System Development Edition und von Visual Studio Team System Database Edition die jeweils andere Edition kostenlos erhalten.

 

Für bestehende Kunden

·         Kunden, die bereits Visual Studio Team System 2008 Development Edition with MSDN Premium Subscription lizenziert haben, können die Team Database Edition über das MSDN Subscriber Download Center herunterladen und produktiv einsetzen.

·         Kunden, die bereits Visual Studio Team System 2008 Database Edition with MSDN Premium Subscription lizenziert haben, können die Team Development Edition über das MSDN Subscriber Download Center herunterladen und produktiv einsetzen.

 

Für Neukunden

·         Kunden, die ab dem 1. Oktober entweder Visual Studio Team System 2008 Development Edition with MSDN Premium Subscription oder Team Database Edition with MSDN Premium Subscription lizenzieren/kaufen, können die jeweils andere Edition über das MSDN Subscriber Download Center herunterladen und produktiv einsetzen.

Posted by kcasada | 1 Comments
Filed under:

Visual Studio 2010 und das .NET Framework 4.0

Gerade hat Microsoft die ersten Informationen zur nächsten Version von Visual Studio und dem .NET Framework bekannt gegeben: http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx.

Der Fokus des nächstes Releases ist wie folgt:

"riding the next-generation platform wave, inspiring developer delight, powering breakthrough departmental applications, enabling emerging trends such as cloud computing, and democratizing application life-cycle management (ALM)."

Posted by Olaf | 1 Comments

Silverlight 2 Release Candidate Available

Silverlight 2 Release Candidate is now available to developers for testing purposes and to help prepare your Silverlight 2 Beta 2 applications for the release of Silverlight 2. This release is therefore not intended for public deployment, as end users will not have a way to install a suitable plug-in to view the application. No existing public versions (released or beta) of Silverlight 1.0 or 2 Beta 2 will be auto-upgrade to this runtime. As said this is only for developers.

As mentioned on this detailed post of Scott Guthrie, you can download today’s Silverlight Release Candidate with VS and Blend support for it here.

Posted by kcasada | 0 Comments
Filed under:

Webcast: Internet Explorer 8 Beta 2 für Endanwender

Ich habe heute eine Demonstration, die ich neulich als Einführung zu Internet Explorer 8 für Endanwender gegeben habe, als Deutschsprachigen Webcast in neun Teilen Aufgezeichnet. Die Themen umfassen:

  • Schnelle, einfache Navigation
  • Effiziente Suche
  • Übersetzen von fremdsprachigen Inhalten
  • Arbeiten mit Tabs
  • Sicherheitsfunktionen
  • InPrivate Browsing
  • Verwalten des Browser-Cache
  • Kompatibilitäts-Modus
  • Entfernen der Betaversion
Posted by Saschac | 1 Comments
Filed under: ,

24 Hours of Windows Mobile Application Development

Interested in Windows Mobile development? Then have a look at this 24 hours webcast series, where you can learn how to develop applications for Windows Mobile Devices. By attending this webcast you get a high-level introduction to developing managed applications for Windows Mobile devices. You get an overview of the available development tools, an explanation of how to install additional software development kits (SDKs) and demonstrations of the creation of applications for Windows Mobile 6 devices, using both Microsoft Visual C# and Microsoft Visual Basic .NET.

If instead, you don’t have much time, have a look to our Windows Mobile Hands On Lab, which give you a good overview of what is possible today to do with the Windows Mobile Platform. Manual is available in English at http://www.microsoft.com/switzerland/msdn/de/events/eventdetail.mspx?EventID=1032382445 (click on the Download link at the bottom of the page).

Die häufigsten Kundenfragen (Teil 8)

Hier finden Sie eine Liste der häufigsten Kunden-Fragen.

1.      Wieso wird die verbundene Entität nicht automatisch ins Entity Framework geladen, wenn ich innerhalb des Entity Frameworks eine NavigationProperty referenziere (im Stil von „LINQ to SQL“)?


Das Entity Framework versucht alles explizit zu machen. Das bedeutet, dass man auch bei „Lazy Loading“ die Load-Methode der verbundenen NavigationProperty aufrufen muss. Da „Explicit-Loading“ verlangt wird, wissen wir genau, wann ein RoundTrip zur Datenbank ausgeführt wird.

2.      Wie kann ich mit dem Entity Framework das generierte SQL Statement sehen, welches zur Datenbank geschickt wird?

 

Wenn Sie SQL Server benutzen, können Sie den SQL Server Profiler verwenden. Alternativ kann die ToTraceString-Methode der ObjectQuery oder EntityCommand Objekte verwendet werden.

 

3.      Ich habe einen WCF-Dienst geschrieben und getestet. Mit einer Client Winform-Anwendung funktioniert alles ohne Probleme. Wenn ich aber versuche, den gleichen Dienst von meiner Silverlight-Anwendung aufzurufen, kriege ich einen 404 -Fehler: System.ServiceModel.ProtocolException: "The remote server returned an unexpected response: (404) Not Found." Wie kann das passieren?


Sehr wahrscheinlich läuft der WCF-Dienst nicht in der gleichen Domäne wie Ihre Silverlight-Anwendung. Um einen solchen „Cross-Domain“ Aufruf machen zu können, muss eine clientaccesspolicy.xml-Datei in das Root-Verzeichnis dieser Domäne angelegt werden.

 

Wie sieht eine clientaccesspolicy.xml Datei aus?

<?xml version="1.0" encoding="utf-8"?>

<access-policy>

  <cross-domain-access>

    <policy>

      <allow-from http-request-headers="*">

        <domain uri="*"/>

      </allow-from>

      <grant-to>

        <resource path="/" include-subpaths="true"/>

      </grant-to>

    </policy>

  </cross-domain-access>

</access-policy>

 

Mehr zu diesem Thema finden Sie in diesem Video (englisch).

  

 

Posted by kcasada | 1 Comments
Filed under:

Providers for the ADO.NET Entity Framework

As you can see on the announcement of the ADO.NET Team Blog, Devart has released a new version of their ADO.NET providers, which includes support for the Entity Framework. With this release developers can now access their Oracle, MySQL and PostgreSQL databases via the Entity Framework.

Posted by kcasada | 1 Comments
Filed under:

Deploying .NET Framework 3.5 SP1

I decided to write this post after I found myself a little bit lost trying to find customer's answers in the official MSDN documentation about deploying the .NET Framework 3.5 SP1. Luckily at the end I found Aaron Stebner's Blog. Aaron previously worked for the setup team for Visual Studio and the .NET Framework and on his blog I could find really a lot of useful information (a lot of great posts!) for solving all customer ‘concerns. Thanks Aaron!

I will then try to summarize what I find out:


  • The .NET Framework 3.5 SP1 is a slip-stream replacement for the .NET Framework 3.5. What does it mean? That it will install correctly on systems that do not yet have the .NET Framework 3.5. Instead, if you run it on a system that does already have the .NET Framework 3.5, it will automatically upgrade 3.5 to 3.5 SP1 for you.


  • The .NET Framework 3.5 SP1 contains all of the prerequisites and hot fixes needed to install the .NET Framework 3.5 SP1 on all operating systems. The .NET Framework 2.0 and 3.0 are part of the OS on Windows Vista, and the .NET Framework 3.5 SP1 contains Windows Vista update packages to apply the .NET Framework 2.0 SP2 and 3.0 SP2 on that OS. You do not need to install anything separately.


  • Pay attention if you run .NET Framework 3.5 SP1 on a non-English OS!
    If you run the .NET Framework 3.5 SP1 on a non-English OS, it will attempt to install the .NET Framework 3.5 SP1 language pack in the language that matches the OS language by default. As the language pack is not a part of the full package, the .NET Framework 3.5 SP1 installer will attempt to download it and install it for the user behind the scenes on non-English OS's. If you want to get more information on this specific scenario you can have a look at case 2 described in the following post of Aaron Stebner: http://blogs.msdn.com/astebner/archive/2008/07/17/8745415.aspx (the blog post is about .NET Framework 3.5, but the same behavior exists in the .NET Framework 3.5 SP1).


  • The .NET Framework 3.5 SP1 language pack is a slip-stream replacement for the .NET Framework 3.5 language pack. It will install correctly on systems that do not yet have the .NET Framework 3.5 language pack. If you run it on a system that does already have the .NET Framework 3.5 language pack, it will automatically upgrade the 3.5 language pack to the 3.5 SP1 language pack behind the scenes for you.
Posted by kcasada | 1 Comments
Filed under:

Source Code For .NET 3.5 SP1

I just discovered a new blog, the Reference Source Code Center's Team Blog. What is about? As you may know, one of the new features of Visual Studio 2008 was the ability to debug into the .NET Framework source code. This blog is exactly about that: you can find links to forum and relevant information to this particular topic. Two weeks ago they just announced the availability of sources for the .NET Framework 3.5 SP1. Have a look at this post and you will find all instructions in order to configure Visual Studio 2008 for doing .NET source code debugging.

Posted by kcasada | 1 Comments
Filed under: ,

Flash Developers can learn about Silverlight from Project Rosetta

A very nice resource I just discovered is Project Rosetta, a site dedicated to helping designers and developers build applications in Silverlight while taking advantage of skills they already know. In the eleven chapters that already exist, advanced topics such as, Coded Animations, Dragging, Easing & Inertia, Loading Dynamic Images, Masking & Clipping, Color, Scale & Rotation, Trigonometry or Image Sequencing are discussed including working samples and source code in Adobe Flash and in Silverlight.


Project Rosetta Silverlight Sample

The examples are beautiful and appealing and each lesson has good references to articles covering the topic in discussion.

To track Project Rosetta you can subscribe to the RSS feed or follow the project on Twitter.

There is also some video coverage on the project:

Posted by Saschac | 1 Comments
Filed under: , ,

SharePoint Developers: SDK 1.4 verfügbar

Für Office SharePoint Server 2007 (MOSS) und für Windows SharePoint Services 3.0 (WSS) ist soeben ein neues SDK erschienen - Version 1.4.

Weitere Infos und Download:

http://blogs.msdn.com/randalli/archive/2008/08/28/just-published-wss-and-moss-sdk-1-4-download-and-online-msdn-library-8-29-2008.aspx

Posted by Olaf | 1 Comments

Well Performing Silverlight Application with XAML On Demand

With this post I’ll show you how you can extend the user interface of a Silverlight application with additional content downloaded on user’s demand. This is sometimes required if you want to have well performing Silverlight applications. What does it mean? That the content (UI + Assemblies) of an application can be splitted into multiple assemblies and pieces of UI can be organized into different XAML files and therefore downloaded on demand. Thus, at some point, the extra needed content must be brought down to the client.

In order to do that Silverlight comes with a WebClient class, which can be used each time you need to download stuffs from a web server.

In case you just need to download something that can be processed as a string (for instance JS code or plain XAML, but not managed code), then you can use the DownloadStringAsync method of the WebClient class. In this particular case you can then make use of the XAMLReader class in order to parse and transform the downloaded string into a Silverlight tree object, which can then be appended to the UI of the main application (for instance by using a stackpanel control as a placeholder).

If you think about what a more complex Silverlight application might needs, you will probably see that in many scenarios you will need to download not just some XAML but also some related code (for instance a code-behind file), which is compiled into an assembly. So, the next question is, how can I download and integrate extra assemblies into a Silverlight application on demand?

So, in this specific case you are not working with a string, but you are working with binaries which can also include XAML code. To solve this more challenging part, you can use once again the WebClient class, but this time you have to use the OpenReadAsync method, which connects to a specific URL (passed as a parameter) representing the additional xap package you want to download and returns a stream of data. Once you get the stream of data you can extract all the contained assemblies (including the XAML code) and load them in memory. image
Once the assembly has been loaded in memory you can instantiate the class you need.

In order to execute this big task Silverlight offers you once again some out-of the box classes:  the StreamResourceInfo and the AssemblyPart class.

OK, this was just an introduction; let’s now start building our “on-demand” sample solution!

Create a new Silverlight project named MainSLApp within Visual Studio 2008. This will be our main Silverlight application and will be hosted inside a Web Site application (MainSLAppWeb).

Once you have created the project you will notice that 2 XAML files have been created: App.xaml and Page.xaml files (with related code-behind files). If you have a look at the App.xaml file you will see that there is a reference (x:Class="MainSLApp.App" ) to the App class, which is the main Silverlight Application entry point.  If you have a look at the constructor of the App class you can also notice that an handler for the Startup event is registered and that the code defined inside this handler (which runs when the application is instantiated by the Silverlight’s plug-in) instantiates the Page class (new Page();).

public partial class App : Application

{

        public App()

        {

            this.Startup += this.Application_Startup;

            this.Exit += this.Application_Exit;

            this.UnhandledException += this.Application_UnhandledException;

 

            InitializeComponent();

        }

 

        private void Application_Startup(object sender, StartupEventArgs e)

        {

            this.RootVisual = new Page();

        }

 
}

The Page class is defined within the Page.xaml.cs file and is bind to the Page.xaml file which represents the User Interface of our application. Now, in order to build our “on-demand” sample application let’s modify the XAML code of the Page.xaml file in the following way (note that the UI is represented by a UserControl):

<UserControl x:Class="MainSLApp.Page"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    Width="450" Height="300">

    <Grid x:Name="LayoutRoot" Background="White">

        <StackPanel Width="400" HorizontalAlignment="Left" Background="YellowGreen">

            <TextBlock TextWrapping="Wrap">Main User Interface with "Load Additional Content" Button</TextBlock>

            <Button HorizontalAlignment="Left" Width="150" x:Name="LoadExtraUI" Content="Load Additional Content"></Button>

            <TextBlock TextWrapping="Wrap">By pressing "Load Attitional Content" some extra stuff will appear within the blue area</TextBlock>

        </StackPanel>

        <StackPanel x:Name="myPlaceHolder" Width="400" HorizontalAlignment="Left" Height="100" Background="Aqua" VerticalAlignment="Bottom"></StackPanel>

    </Grid>

</UserControl>

By replacing the XAML inside the XAML designer you will get the following result:

image

Note that I have defined a StackPanel control as a placeholder for the additional content to be shown. It’s now time to implement the whole logic responsible for downloading all additional content (xaml + assemblies) from the web server down to the client machine. As mentioned before we are going to use the WebClient class with the OpenReadAsync method and the StreamResourceInfo and AssemblyPart classes.

In order to do that I’ll now implement a helper class named ManagedDownloader. Why this strange name and not just Downloader? Because I don’t want to create confusion between this class and the one available for Javascript.

Let’s add a new SilverlightClassLibrary project and name it SilverlightHelper. Then rename the Class1.cs file and the relative class name to ManagedDownloader.

Let’s now implement ManageDownloader. As first let’s define an event (PackageDownloaded), which will be fired when the ManagedDownloader class has finished downloading the whole xap package. Note that the event argument is of type PackageDownloadedEventArgs and that PackageDownloadedEventArgs implements a public member returning a UserControl (which represents the additional UI).

public class PackageDownloadedEventArgs : EventArgs

{

public UserControl Downloadedobj;

}

 

public class ManagedDownloader

{

       public event EventHandler<PackageDownloadedEventArgs> PackageDownloaded;

}

Now add the following methods to the ManagedDownloader class.

public void LoadPackage(string xapURL, string assemblyName, string userControlClassName)

{

_assemblyName = assemblyName;

      _userControlClassName = userControlClassName;

 

       WebClient wc = new WebClient();

wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted);

       wc.OpenReadAsync(new Uri(xapURL));

}

 

void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)

{

throw new NotImplementedException();

}

Also, do not forget to add the definition of the 2 private members (_assemblyName, _userControlClassName) to the ManagedDownloader class. If you have a look at the LoadPackage method you see that this method receives the address of the xap package to be downloaded, the assembly’s name to be loaded (assembly which is included in the xap package) and the class name of the UserControl to be instantiated (representing the additional UI). An instance of the WebClient class is then created created. Before calling the OpenReadAsync method (which returns a stream of data representing the xap package defined by the passed URL), an handler for the OpenReadCompleted event is registered  (wc_OpenReadCompleted). This handler is called at the point the download of the xap package from the web server down to the client is completed. Let’s implement it.

void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)

{

//e.Result contains the stream representing the xap package

 

//Extract the assembly from the xap package (zip package)

//and load it into the current application domain

Assembly assembly = LoadAssembly(_assemblyName, e.Result);

}

 

private Assembly LoadAssembly (string AssemblyName, Stream zipStream)

{

//assemblyURI defines the relative URI that indentifies the resource file to be extracted from the zip file)

Uri assemblyURI = new Uri(_assemblyName, UriKind.Relative);

 

       //Extract and load the assembly containing the additional UI.

       //The StreamResourceInfo class provides resource stream information

       StreamResource