ado.net data service with mysql 6.2.3 - mysql

I'm using .Net 3.5 SP1. Just installed ADO.Net Data Service (ADO.NET Data Services Update for .NET Framework 3.5 SP1 )
I can successfully create Entities using ADO.Net Entity Framework. I'm following this article Create OData Feed. Instead of config.SetEntitySetAccessRule("*", EntitySetRights.AllRead); I have config.SetResourceContainerAccessRule("*", ResourceContainerRights.None);.
But the end result is I can only see <atom:title>Default</atom:title>.
Please help
Thanks in advance.

If you set the rights to None, then nobody can access anything on the service. As a result all the entity sets are hidden and that's why you see nothing in the service document.
The data service hides entity sets and types which are not accessible (behaves as if they don't exist).
You need to allow access to at least something in order to use the service.

Related

Generate graphql schema based on the SQL Server 2014 database

I am in the process of developing an API using Graphql and asp.net core 2.Can anyone help me to know is there any nuget package or open source solution to generate schema based on the SQL Server 2014 database.
I see that there is a solution for java : https://github.com/leangen/graphql-spqr
You could use sql-to-graphql to generate GraphQL schemas and server based on SQL table structure. The only problem with this, is that the project is unmaintained.

application role and Crystal Report 2005

I have my application created on VB.NET using SQL server 2008 R2. We have used crystal report for our data to view extensively. We have used connectionInfo interface class to build trusted and sometime non-trusted connection based on input to display data from SQL. We have newly implemented Database application role in our application to limit the access of user to the DB level. How can we implement Database application Role in case of Crystal Report while working with connectionInfo.
Thanks in advance looking forward to have positive response.
Regards,
Salman Momin
See the first google response: http://technet.microsoft.com/en-us/library/ms190998.aspx
You call/submit sp_setapprole with the application password from your VB.Net application.

MySQL Data Source Entity in Visual Studio 2012

I have also encountered the problem to create a data source in VS2012 with MySQL connector, while many thanks for the connector updates from Oracle.
Than I installed the MySQL connector version 6.6.5, it looks work well while there is no directory in the "Data Source" sub-window but the Model has been created after I created the data source.
When I configuring the insert process to the data using Linq, VS2012 tells there is no such method "AddTo".
Therefore, according the things happened during my programming:
Is it common that the data source will not be shown in that sub window after I have already add the data entities?
Why there is no such method "AddTo" (Actually no any methods at all in the definition) when I using Linq with VS2012?
Many thanks in advance,
Harry

linq to mySQL How can I trick VB Express to use it?

I'm currently using VB.NET Express to connect to mySQL over the net. No problem as long as I use plain vanilla SQL connections and statements.
But when it comes to LINQ 2 mySql, I'm struck by VB Express's limitation.
Any clue you gurus?
You'll need to switch out to using something like DBLinq, Entity Framework, or nHibernate instead of Linq-to-SQL. Linq-to-SQL only supports SQL Server and SQL Server CE. This isn't a
limitation of Visual Studio Express at all. Actually, the only limitations I know of with the express editions are that they don't support any Visual Studio plug-ins - but as far as CLR features, you aren't limited at all using Express. And, Entity Framework is built-in and available for you to use out of the box. And stackoverflow has info on the MySQL connector.
After a couple of days searching, Iv' finally reached the Saint Graal!
Since you guys at StackOverflow are so great a bunch of blokes, I've written a little how to sample for you. Here it is:
1 - The ONLY sensible, free and working product I've founr is Devart LinqConnect Express edition.
Its a free product from www.devart.com, capable of:
(Please note I have no particular links nor interest with them.)
Generating datacontext from its own embarked Devart EntityDeveloper free edition
(With some limits in number of tables per context, 10 if I'm right).
Complete the LINQ dlls into Visual Basic Express edition, without having to create a datasource from the datasource explorer.
Ok, once you've installed the package, here's the how to:
Launch the Entity designer from Program Files\Devart LinqConnect and create the model from the database.
Save the model and launch your VB Winform project.
Add the following .NET references:
Devart.Data.Linq
Devart.Data.MySql.Linq '-- Or any other DB you need
System.Data.Linq
Now add the new datacontext.designer.vb file you've created in Entity Developer
to the project:
Right-click the project in Solution Explorer and select
Add existing item
Locate the datacontext file and that's almost it!
Create a button and a datagridview named dgv1 onto your form.
5 more lines of code and you're set!
Button code:
Dim ctx As New myDataContext.myDataContext
Using ctx
Dim tbl = From xxx In ctx.myTable
Select xxx
dgv1.DataSource = xxx.ToList
End Using
The rest is pure cosmetic LOL...
It is worth to mention that although their product is great, the support is great as well!
They answered my questions in less than 12 hours.

LINQ to SQL vs Entity Framework for an app with a future SQL Azure version

I've got a vertical market Dot Net Framework 1.1 C#/WinForms/SQL Server 2000 application. Currently it uses ADO.Net and Microsoft's SQLHelper for CRUD operations.
I've successfully converted it to Dot Net Framework 4 C#/WinForms/ SQL Server 2008. What I'd like to do is also offer my customers the OPTION to use SQL Azure as a backend storage for their data instead of local/LAN SQL Server.
If I know SQL Azure is in my application's future, should I:
A. Switch to LINQ to SQL
or
B. Swith to Entity Framework
or
C. Stick with ADO.Net and SQLHelper
?
Thanks !
I would switch to Entity Framework, it works just fine with SQLAzure and is the recommended ORM by Microsoft for .Net 4
ADO.net works just fine,
My personal favorite is Linq2Sql which works fine with azure
Microsoft is now recommending that everyone switch to entity framework