Presenter:Mike Taulty
ADO.NET V3.0 will come with the ADO.NET Entity Framework and a flexible object relational mapping layer that plugs in to LINQ - LINQ to Entities. In this video we'll take a look at how we can use metadata generation tools in order to produce the necessary models for the Entity Framework.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
Oh my name is Mike ultimate work Microsoft in the UK this is one of a series of videos about a new technology comes radio net version 3 that technology is called the entity framework and we have on top of it a programming model link to entities because languages ready the anti framework if you haven t seen and that these the introductory video in this series are strongly recommend that you have a look at our video as otherwise something that he might not make sense to take a quick look at in this video is different ways that we can get metadata into and entity framework project so that lawyers are doing this one is rent using the designer which is in its first own technology previous at quite early at this point and the other way of doing it is run using a command line tool called him gentle acting to discredit a quick look at those two things are done so viciously never got ideal thing for you case near officials ludicrously do I
Minute 1
Beta 2 and I got the first technology preview of the tooling for visual studio around entity framework and in a simple console application one of the ways restoring introductory video that we can add Meta data into this application histidine used the wizards to front us through and build up a model and these finals and database but your head and used the connection string already dark and going to include stuff from my database that has been the tables in this case must finish and that will go away and it will generate the start Ian Maxwell and as we saw in thinking that introductory video EasyNet style that built time forgot build this application gets shredded into three separate files which you need to power the entity framework namely a celestial father conceptual scheme is just an XML file A MSL file this is a mapping between a conceptual schema and the scheme of your database and the SST file which is the
Minute 2
Actual schema of the database so you have this refiled power the framework and normally what he may do is work on this mapping in order to presumably produce a difference in your conceptual model versus just all model and I should not have the disservice to store straight into application which owes you can just with a one to one mapping which is what we get out of the tooling in others touring is given as a one to one mapping so where we had a table in their physical borders and so we have an entity in project called orders and that may may not be what you want abuse in one so that it is quite early the graphical designer this is a seat he won if you like is the first review is seen of this you can be working here of course to change method dating in his column certainty or delete them and so on and you can build up things like inheritance in here and so on and worked pretty nicely pretty well and the other way of using the metadata is to get it from a tool called EDM gender exercise will
Minute 3
Look about it and looks like a command line tool to close a few Farsi and problematic and I might go if I want to use EDM gender axing your spot on the single is quite a lot of flags essentially it operates a look at the modes and the Huguenots at the top you essentially have a full generation that it ll be the easy thing to understand this is just making everything I need in order to get on with my job and most enough are so what we can do here is just quick CLAS EDM gender axing mode full generation ago and only have essentially a connection string to Denaby and cervical start from the database equals Northwind integrated security now so different anonymity through a different providers
Minute 4
Or the entity framework you might also need to specify that providing and assuming sequel because that s what I ve got and also you can now specify things like the out parameter through your CSD Elf Oil MSL file your SS deal file all you can specify project grants will call this Northwind and that kind of controls all the naming for you and their singles and runs away and you can see there essentially think my database is written SS the is written MSL outlook you can see that I ve now got CSD Elf Oil MSL file I ve got some see shall go for my object layabouts going to give me a strongly tight context and so on and I has a skilful and a gutsy shotgun was lying side views so if we go and have a look at present is that object their code was either in here she is rehoused at a big fan to notepad and we can see that we got Northwind context here which will derive from object context it to got
Minute 5
Again form here as one of the most that we can use a distraught governing who can do it until one of the things I find most valuable than ears the screen for a second ears EDM Jane exe mode validate artefacts I think they change spelling corrected that between the last version understood throughout validate artefacts now in order to get your artefacts in their essentially against rest five in SST else of the meals can be Northwind STL you can t use the project ran serious rather where you can have in a sea STL certainly be Northwind CSV early In MSL Northwind MSL and I think if we got that right it will go on run against those files and yet you check whether they re okay on for you and this becomes very useful as you start editing and especially see a skill in itself is to build
Minute 6
A matching pair if you ve managed to get things wrong this mode is really quite invaluable because the error message in adverts like decent and yellowish youth if you got nothing wrong than this becomes something is really quite a useful thing to do the things you can do it might be the utility database earlier and you ve pulled and assess the Elf oil from a handsome look at rid of everything apart from the SST are far remembering that that is really a picture of your store so to now it has got get a scale far so once again ingredient in the axing we got the SST we have invited back to access the physical store and we say moved from assess the yell generation of the difficult and project that s a nonsense if that works for us it is merely unspecified and in assist yell as criminals when doctors stay on and you consider that we can
Minute 7
Look at those bits without actually speaking to the Northern database so that might be useful thing getting up at your comment energy to the database at the point where your and try to do this work is just a screen nevertheless quite important to know about is their turn it might be that you start edit your conceptual model here animation changes to it and because you may change in conceptual model you will want to regenerate the code because there is a one to one mapping ran earnestly friendly between this cold layer and the conceptual layer so they can remarkably tightly together if you attack your CSD file you are delayed at CES is getting out of sync with that now if you go on rerun and hath she rerun the entire generation process you will overwrite as he is the file that is not what you want so there is another mould on here we can do an EDM gender taxi that is get rid of the North and object layer s s five stewards are on a sofa wanted to have
Minute 8
In the change this year s kill file only maybe a bit of mapping and we want to regenerate code from the sweeties again gender taxi mould is that the entity class generation I think we can probably use insulin year old Northland gutsiest girl and I m fractured his project to get the output is controlled for autostrada and you can see that what we ve now got is a new object they are far from that s act of the screen so that three quite useful to cases with changes yet yell and want to get new code you can program against a match directly to that serious the art makes a lot of sense whatever you do this to a well essentially that has go back to the to help for a you can see that you can have more granular control over this yesterday files you can have celestial files include office yesterday files you have that option here where your MSL is coming from the US are still coming from where he won
Minute 9
Alps to girls away when you see a steel annus LSS SQL delay refusal to be written to control the smiles at a granular level as you want it or he can just use at projects acting as you were doing it you can draw the language of generations who shall completely you can control the namespace of the conceptual model so when you get a conceptual model is just notepad and an amnesty offer us yesterday file here you can see that this thing has the namespace court Northland you can control at and also I should have stayed in a file because it will have a recognized the container is well and you can control the name of the anti container to those in the model and the coach is matched to the model model and she has no and is very much if so does lots of options are natural and it s a valuable tool to know about a year in conjunction with the designer and the trick about this though is that bear in mind that the designer really works from and media next file
Minute 10
Where is this tool creates you separates your deal annus L and S kill file so when you are sometimes you look to do what you want in the designer and that was certainly my starting point at the moment because that s quite an early preview and and just generally only like mum until the useful to have around you may wonder nobody in agenda axe is well as an ultimate way of getting to stiffen her portions of the metadata that underpinned the entity framework so just a short video their rejoin the couple of tools and I would naturally assume that anyone would want to start with the designer unless the building back and the insistence of the cartographic site was only some of the designer into regenerating your socio MSL and assess deal if you find because the designer is just an early preview is by the designers and doing what you want and Unita Gough and Haxton separates our files then feel free to go do that at EDM agenda axe you can be your friend is
Minute 11
Picasso is strong enough validation aspect is that it will requite goods if you are playing around with files playing around the entity framework and you break things remember the EDM agenda axe he can validate things for you and it is really valuable in that case we saw a few other modes and it can do full generation you give me everything from database it can generate classes from a celestial file it can take and assess the old file and generate the other bits from it from really a case where you line from the school you ve got a scheme description of the spill to just two draws and really that Bolivia was to highlight medium gender axing so where can you go of your more information on topics is seen here I recognize the link centre of honesty and so there s a whole section devoted to language integrated query of their I would also recommend going to the aid of the 19 blocks in the link is up there on the screen for a good of their band s lover really an interesting information Lochside is a good place to keep in touch with
Minute 12
Is going on on the entity framework if you got specific questions that something so in this video feel free to mail me my e mail address is there on screen and other that vivendi session useful and I would hope to catch a
Click here to go to original video page
Monday, July 21, 2008
Video: LINQ to Entities - Metadata Generation Tools
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment