« Home « Chủ đề lập trình Visual

Chủ đề : lập trình Visual


Có 40+ tài liệu thuộc chủ đề "lập trình Visual"

Lập trình .net 4.0 và visual studio 2010 part 20

tailieu.vn

Probably the biggest problem you may encounter is in the initial release of WF there is no support for statemachine workflows. Version 3 of the WF runtime will be included with .NET 4.0 runtime, so your WF3 should continue to run on the .NET 4.0 framework.. WF 4 offers superior performance (10 to 100 times quicker), a much improved designer,...

Lập trình .net 4.0 và visual studio 2010 part 21

tailieu.vn

Open Program.cs and add the following using statement:. using System.Collections.Generic;. Modify the Main() method to the following to create and pass in a dictionary of our initial variables:. Arguments.Add("FilmName Terminator");. Arguments.Add("ShowingDate", System.DateTime.Now.ToString());. Arguments.Add("NumberOfTickets", 4);. Right-click on the project and add a new activity (from the Workflow section) called SaveBooking.xaml.. Open SaveBooking.xaml in the design view.. Drag a WriteLine activity onto...

Lập trình .net 4.0 và visual studio 2010 part 22

tailieu.vn

Correlation functionality first appeared in WF3.5 and allows you to route incoming messages to specific workflow instances based on their content or protocol used. Now add a new console application to the solution called Chapter6.WFServiceClient.. In Chapter6.WFServiceClient modify Program.cs to the following:. You should see the message “777 sent from WF Service” output to the console.. CancellationScope allows you to...

Lập trình .net 4.0 và visual studio 2010 part 23

tailieu.vn

Create a new WCF Service Library project called Chapter7.ConfiglessService.. Add a console application to the solution called Chapter7.ConfiglessHost.. In Chapter7.ConfiglessHost add a reference to Chapter7.ConfiglessService and the System.ServiceModel assembly.. In the Chapter7.ConfiglessHost Program.cs add the following using directive:. using System.ServiceModel;. Enter the following code in Program.cs’s Main() method to instantiate our service:. new ServiceHost(typeof(Chapter7.ConfiglessService.Service1), new Uri("http://localhost:8888/Chapter7"));. MyServiceHost.Open();. Now right-click on...

Lập trình .net 4.0 và visual studio 2010 part 24

tailieu.vn

WS-Discovery. WCF4 contains support for the WS-Discovery protocol that allows the discovery of services on a network.. WS-Discovery was originally developed as joint venture between BEA Systems, Canon, Intel, Microsoft, and WebMethods, and is famously used in Windows Vista to provide the “people near me” functionality.. For more information on WS-Discovery please refer to http://schemas.xmlsoap.org/ws/2004/10/. discovery/ws-discovery.pdf.. WS-Discovery is a great...

Lập trình .net 4.0 và visual studio 2010 part 25

tailieu.vn

Caching wasn’t too easy to implement prior to WCF4 however it is very easy in WCF4 with the simple addition of the AspNetCache profile attribute to your methods:. There’s a new DataContractResolver class that allows control over the serialization process of types (http://msdn.microsoft.com/en-us/library/system.runtime.. serialization.datacontractresolver(VS.100).aspx).. The addition of non-destructive queue receive (an alternative way of processing messages that makes a queue...

Lập trình .net 4.0 và visual studio 2010 part 26

tailieu.vn

Entity Framework (EF) is Microsoft’s Object Relational Mapping (ORM) solution and was first released with .NET 3.5SP1. Entity Framework received much criticism when it was first released and the team at Microsoft has been hard at work to address some of these criticisms in the latest version.. It is also worth noting that EF is likely to have releases out...

Lập trình .net 4.0 và visual studio 2010 part 27

tailieu.vn

var query = from o in ctx.Orders select o;. query = ctx.Orders.OrderBy("it.OrderID");. ctx.AddObject("Films", NewFilm);. ctx.SaveChanges();. ctx.AddToFilms(NewFilm);. Film FilmToUpdate = ctx.Films.Where("it.FilmID = 3").First();. ctx.Films.DeleteObject(ctx.Films.Where("it.FilmID = 5").First());. foreach (FilmShowing fs in ctx.FilmShowings.Where("it.FilmID = 5". ctx.FilmShowings.DeleteObject(fs);

Lập trình .net 4.0 và visual studio 2010 part 28

tailieu.vn

To do this, simply right-click on the item you want to remove under the Store node and select Delete. Right-click and select the Refactor into New Complex Type option on the context menu.. Right-click on the Complex Types folder and add a new complex type called FilmCrew.. Right-click on the newly created complex type and add three new string scalar...

Lập trình .net 4.0 và visual studio 2010 part 29

tailieu.vn

In our convoluted example we will create a new property for our Film entity that will return the Film title and description separated by a space.. Right-click on the Chapter8Model.edmx file and select Open With.. Find the following section:. <Schema Namespace="BookModel". xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation". xmlns="http://schemas.microsoft.com/ado/2008/09/edm">. Add the following inside the previous section:. <Function Name="LongFilmDescription". ReturnType="Edm.String">. <Parameter Name="Film". Type="BookModel.Film">. </Parameter>. <DefiningExpression>. Trim(Film.Title. Film.Description...

Lập trình .net 4.0 và visual studio 2010 part 30

tailieu.vn

FOREIGN KEY ([CustomerCustomerID]) REFERENCES [dbo].[Customers]. One of the biggest complaints about Entity Framework v1 was that, unless you wanted to write some complex code, you had to work with the generated classes and associated data context. This dependence on Entity Framework made it harder to perform unit testing, create n-tier applications, and work with third-party systems.. http://code.msdn.microsoft.com/EFPocoAdapter. using System.Data.Objects;. using...

Lập trình .net 4.0 và visual studio 2010 part 31

tailieu.vn

WCF Data Services. Availability: .NET 3.5SP1 (limited functionality) onwards. WCF Data Services (previously “Astoria” and ADO.NET Data Services) allows data to be modified and exposed over an HTTP RESTful interface. WCF Data Services (WDS) contains a rich query language and can be accessed easily with automatically generated proxy classes or crafting raw HTTP requests.. WCF Data Services supports returning data...

Lập trình .net 4.0 và visual studio 2010 part 32

tailieu.vn

Right click on MovieService.svc and select Set As Start Page.. Querying WCF Data Services. For example, to retrieve the film entities, add /Films to the end of the existing URL (for example, http://localhost/Chapter9/MovieService.svc/Films).. When working with WCF Data Services you should note the following:. For example, open MovieService.cs and find the line that reads:. The following line of code will...

Lập trình .net 4.0 và visual studio 2010 part 33

tailieu.vn

Select Add Service Reference to add the URL your WDS is set up at (for example, http://localhost/Chapter9/MovieService.svc).. new DataServiceContext(new Uri("http://localhost/ Chapter9 /MovieService.svc"));. ctx.Execute<MovieService.Models.Order>(new Uri("Orders", UriKind.Relative));. foreach (MovieService.Models.Order Order in Orders). new DataServiceContext(new Uri("http://localhost/Chapter9/MovieService.svc"));. MovieService.Models.Film NewFilm = new MovieService.Models.Film();. ctx.AddObject("Films", NewFilm);. ctx.SaveChanges();. MovieService.Models.Film FilmToUpdate. ctx.Execute<MovieService.Models.Film>(new Uri("Films(1)", UriKind.Relative)).First();. ctx.UpdateObject(FilmToUpdate);. MovieService.Models.Film FilmToDelete. ctx.DeleteObject(FilmToDelete);. http://localhost/Chapter9/MovieService.svc/Orders/$count. http://localhost/Chapter9/MovieService.svc/Orders?$inlinecount=allpages. href="http://localhost/Chapter9/MovieService.svc/Orders?$skiptoken=2". http://localhost/Chapter9/MovieService.svc/Orders?$select=Firstname,Lastname. http://localhost/Chapter9/MovieService.svc/Orders?$select=Firstname,Lastname,OrderItems. http://localhost/Chapter9/MovieService.svc/Orders?$select=Firstname,Lastname,OrderItems&. What’s the Relationship Between...

Lập trình .net 4.0 và visual studio 2010 part 34

tailieu.vn

ASP.NET. ASP.NET is a mature platform on which to build web applications, and it is probably fair to say that most of the changes in this release are enhancements and tweaks. VS2010 contains a number of new types of ASP.net project and some modifications to existing types:. New Empty ASP.NET Web Application (just the bare minimum). New ASP.NET AJAX Server...

Lập trình .net 4.0 và visual studio 2010 part 35

tailieu.vn

VS2010 allows you to. Perform transformations on Web.config for different build configurations.. Install your application and all its settings with just one click (one-click publishing).. Web.config Transformation. Many developers use Web.config file to hold application specific settings, such as database connection strings. The trouble with Web.config is that when you deploy your applications, you normally have to change these settings....

Lập trình .net 4.0 và visual studio 2010 part 36

tailieu.vn

ViewState is the mechanism by which ASP.NET stores the state of controls on a web form. ASP.NET 4.0 gives you the ability for controls to inherit ViewState settings from parent controls by using the new ViewStateMode property. A long-term irritation in ASP.NET is the lack of control you have over the ID property of rendered controls. Most of the time,...

Lập trình .net 4.0 và visual studio 2010 part 37

tailieu.vn

In previous versions of ASP.NET, when a row was selected within a ListView (or GridView) and the user moved to another page, the selection was maintained on the next page. ASP.NET 4.0 resolves this problem with the new EnablePersistedSelection property. <asp:ListView ID="lstView". runat="server">. <asp:PlaceHolder ID="itemPlaceholder". runat="server"></asp:PlaceHolder>. </asp:ListView>. ASP.NET 4.0 allows you to do the following:. <asp:ListView ID="ListView1". Some ASP.NET applications...

Lập trình .net 4.0 và visual studio 2010 part 38

tailieu.vn

Microsoft AJAX Library. Visual Studio 2010 includes a new version of the Microsoft AJAX libraries that can be used in any web application. When working with the Microsoft AJAX library, many developers believe that it consists of little more than the UpdatePanel, which is a shame because it offers so much more. Many developers also believe that the Microsoft AJAX...

Lập trình .net 4.0 và visual studio 2010 part 39

tailieu.vn

The following code attaches an ASP.NET AJAX watermark control to a text box and an ASP.NET AJAX color picker:. Sys.require([Sys.scripts.jQuery, Sys.components.watermark, Sys.components.colorPicker]);. Sys.onReady(function. WPF/Silverlight developers might notice some similarity with the binding syntax.. Unzip the downloaded file and copy the contents of the Scripts directory to the new project’s root directory.. Drag Start.js to the default.htm head HTML section to...