Telerik Data Access generate classes automatically - visual-studio

Until the recent release I was happily using Telerik Data Access in a database first way:
Created the database schema in external DB designer
Generated a fluent model in Visual Studio
Whenever I did a database change I either re-ran the generation or updated models via visual designer depending on the magnitude of the change
After the last release the templates I used for the generation are gone (as is the visual designer) and any attempt at Googling the solution takes me to a Telerik documentation page saying the info is deprecated.
I'm working with large existing databases (100+ tables) and there's no way I'm coding the models by hand.
What are the current options for auto generating the models?

I got a reply on Telerik forums. Simply said there's nothing I can do now and have to wait til/if they develop a solution. For all that are interested, please vote on the feature request.
Here's the reply:
Thank you for your feedback.
We have already created a new feature request (http://feedback.telerik.com/Project/114/Feedback/Details/163155-generation-of-fluent-models-with-data-access-q2-2015-and-higher) to create a code generating tool to create your fluent models based on your database schema. You are welcome to cast your support vote for the item.
I cannot give you any time frame when we will be able to ship such tool, but I will make sure to notify you as soon as we have a public release.
Regards,
Viktor Zhivkov
Telerik

The feature is still not available. But maybe this is an alternative to being stuck with VisualStudio 2013.
Owners of VisualStudio Enterprise have another option. They can modify the code generation templates and generate the fluent metadata and context code from an UML class diagram.
I invested in checking the MSDN documentation and created a VS extension which I open-sourced.
Please check https://github.com/bdongus/UMLExtensions for details. Feel free contribute.

Related

Visual Studios .NET 4 - adding Oracle Database as Data Source - Warnings about OracleDataAdatper deprecated

When I add an Oracle Database as a Data Source to my project, the automatically generated code in the TableAdapter section is uses System.Data.OracleDataAdapter which is obsolete.
Following the documentation explains that you should use the third party Oracle software (ODAC). Given that the code is autogenerated, I am confused.
Am I missing something here?
Possible Solutions:
I could use .NET 3.5 for my Data Access Layer
Ignore the warnings
Manually Create Table Adapters
Something I am missing?
The solution is to use Oracle Developer Tools for Visual Studios. Add the Data Source in the same way as before (except the form now looks different as a result of the newly installed add on).

WCF Service and LightSwitch using Telerik OpenAccess ORM - editing doesn't work, claims "Specified entity is not managed by a context"

I stumbled upon an issue after following the steps described in http://documentation.telerik.com/openaccess-orm/quick-start-scenarios/getting-started-root-quickstart-vs-light-switch-wcf-ria . I can generate the Model and the Service just fine and adding the DataSource to the Lightswitch project also proceeds without a problem.
If I afterwards create a Desktop client with a screen based on the OpenAccess Service, I can filter and view the data properly, but any attempt at editing or deleting existing records results in an error message stating "Specified entity is not managed by a context". Adding new records works alright (and the newly added records exhibit the same symptoms).
I'm working in Visual Studio 2013 and followed the steps from the Quick Start guide. Is there something I'm missing here? Did anybody succeed at getting a LightSwitch-editable Service from OpenAccess or is it some sort of a known issue that's not stated anywhere explicitly?
I posted the same question on the Telerik Forum and they admitted that they could reproduce this error but could not find any workaround at the moment. They added the issue to their Lighswitch integration roadmap but the timeframe for the fix is yet unknown.
I solved the problem replacing Telerik OpencAccess ORM with classic WCF RIA Service solution (according to the tutorial: http://www.c-sharpcorner.com/UploadFile/raj1979/how-to-use-wcf-ria-service-in-lightswitch-2012/ ). I also had to switch to Visual Studio 2012 to be able to create a Domain Service Class.
Summing up, I had to change some tools but everything works perfectly now.

How do I use LinqPad for updates with CRM 2011

I am working with linqpad and crm 2011, cloud version, and C# snippets. Simple select queries work as advertised. Nonetheless for linqpad to be of any real use I need to get it to do updates and inserts as well and have not been able to find sample code which works or come up with any real information. Several kinds of things which show up in sample code I see around the net are missing. in particular, TestDataContext appears to be part of one or more assemblies which get loaded with linq-sql projects in Visual Studio, but is not in evidence on linqpad. SubmitChanges is not there, and it is not clear what I'd have to do to get at it or to instantiate a new DataContext object and try to use its submitchanges method.
Any usable information would be appreciated.
Well I don't know the CRM 2011 LINQ implementation. Does LINQPad have direct support for that?
Anyway, you basically can run any C# code in LINQPad. Here's a step-by-step guide how to run the needed code:
You need to add the required framework assemblies (maybe take a look at your Visual Studio project). To achieve this, go to the ‘Query’->’Advanced Query Properties’. On the dialog, click on ‘Add…’, then on ‘Browse…’. Browse to the assemblies. Add the required assemblies. Keep the ‘Advanced Query Properties’-dialog open for the next step. Optinally add your own assemblies when you use types from it.
In the ‘Advanced Query Properties’-dialog go the tab ‘Additional Namespace Imports’. Add there the namespaces you need. Expecially the LINQ-namespaces of your LINQ-provider.
Click on ‘Set as default for new queries’ so that you don’t need to repeat the three steps above next time. Then we’re done.
Now you can use the LINQ-provider in LINQ-Pad. Use the 'C#-Statements'-language. Use the .Dump-method to view query results.
Now with that steps you can use any API in LINQPad. With that you can do loops and use the regular API to update objects.
Here's what worked for me in Linqpad for CRM.
Remember that the context is implied in Linqpad.
Create your new entity and load its data, then:
AddObject(entityName);
SaveChanges();

Is there documentation for Team Build 2010 Activites?

As most of you know TFS Team Build 2010 is Windows Workflow based. It comes with a handful of custom Activities out of the box. Is there any documentation available for these activities?
For example Microsoft.TeamFoundation.Build.Workflow.Activities.GetBuildAgent is one of the activities that has basically only one property called Result which I'm assuming takes a variable name that receives the agent name. But how does it determine which agent to select? which variables/arguments does it use to receive input/output? I'm sure if I ask around I can figure out how this specific Activity works, but what about the other 50 activities? I have been unsuccessful in finding documentation on these Microsoft provided activities to date.
There is currently no documentation on these activities. I have seen some previews on a book on Team Build that will arrive soon (keep an eye on this blog) and the VS ALM rangers who will bring their guidance on codeplex during the beginning of CY11.
See Team Foundation Build Activities on MSDN for documentation on all the included build activities.
The GetBuildAgent activity can only be used within an AgentScope activity. It returns the IBuildAgent object of the build agent that it is running on.
William's book on Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build will also cover these build activities in more detail.
Beyond the built-in activities, I immediately found a need to implement custom activities. Some Custom Activity examples are:
Checking in/out a file in the build process
Updating Version properties (to support ClickOnce deployment)
Updating deployment folder html file to support Version updates
I found an article by Jakob Ehn very helpful in navigating through this process.
Ewald Hofman has a very thorough guide to help you get more out of customizing Team Build. It acts as a great reference.

Configure VS 2010 Help for a specific subject

Using VS2008, you could set Document Explorer to limit your search to specific subjects using the Technology dropdown, which made for finding info on a specific subject very easy, as it was limited to a subset of available subject. How is the accomplished in the new VS2010 help?
The VS2010 help at the moment, is very hazy. When I search for Task, or task, or c# task. re the new Task library in .net, it returns a whole bundle of irrelevancy...
Any ideas.
Apparently the Document Explorer is not compatible with VS 2010. There is an extension called H3Viewer developed by a third party which apparently provides similar functionality.
Info stolen from here:
http://www.codeproject.com/Messages/3449925/Re-VS2010-documentation-in.aspx

Resources