ASP.NET Web API 2 local MySQL code first - mysql

I have done simple Web API project using SQL server database with code first approach, see here. But I am not getting any helpful complete tutorial which explains how to create Web API using code first approach with MySQL as database. Could you please give me some sample example.

There isn't much difference since both are relational databases. You need to install the corresponding nuget (Install-Package MySql.Data.Entity), update connection string and you should be good to go
Here is detailed example - http://www.asp.net/identity/overview/getting-started/aspnet-identity-using-mysql-storage-with-an-entityframework-mysql-provider

Related

Github Projects Nodejs Web Api

at the moment I'm trying to get into node.js, especially as a web-api with dedicated functions of getting informations from a database.
I use Sequelize on a MySQL-Database, with Sequelize-auto. The database I am using is the example database Sakila. For the web service I will use Express.
I would like to know, if somebody knows good, well-structured GitHub-Projects, that use the same or at least almost the same technologies I mentioned and that I can use as a reference.
Best regards and thanks, Anton.
Sequelize have an example project
https://github.com/sequelize/express-example

Unable to find all issues through SonarQube WS API

Goal: Export all SonarQube issues for a project to JSON/CSV.
Approach 1: Mine the sonar mysql database
Approach 2: Use the SonarQube WS API
First I was motivated to go for approach-1, but having discussion with the SonarQube core developer community I got the impression not to touch the database at any situation.
Thus I proceed with approach-2 and developed scripts to get issues. However, later I found that through WS-API, I can get upto 10000 issues which does not meet my goal.
Now I am convinced that the approach-1 i.e., mining the database is best for me. When looking at the "issues" table in sonar db, I have the following question.
Question. What is the format/encoding of the "location" field and how can I decode it from python/java?
Extracting data from database is not recommended at all. Schema and content frequently changes. Each upgrade may break your SQL request. Moreover it contains binary data (issue location) which can't be parsed as-is.
The only way to get data is through web services. If api/issues/search faces a limitation that you consider as critical, then you should explain your functional need to the SonarQube google group.

create rest api url to connect with mysql database

I want to learn how to create a rest api url so that I could get and post information into my mysql database using that url.
Googled alot and read various article and didnt find anything precise to learn on this. All are start with about apis and ends with already created rest urls.
Can anyone help on this ?
How to create my own url and authorization key etc ?
Thanks in advance !!
This should help you:
https://github.com/mevdschee/php-crud-api
CRUD stands for:
Create
Read
Update
Delete
This api is written in PHP and gives you a simple and comfortable opportunity to
access your database (MySQL, SQLite 3, PostgreSQL 9 orMS SQL Server 2012). Its well documented and its gonna be easy to get started.
If you need something more custom and not only raw data you should write your own api with help of an framework for example the SlimFramework, where you can specify the methods for requests.
Cause for rest apis there are more methods than GET and POST.
Good Luck ;)

Write Breezejs data source provider with Nodejs for MySQL

I would like to use Breeze with NodeJS and MySQL. Unfortunately, so far I could find no examples of this. I have seen that there is an example of NodeJS + MongoDB. Now I try to analyze the MongoDB provider (mongoSaveHandler.js - [npm install breeze-mongodb]?) to write my own provider for MySQL. Unfortunately I could not find any documentation on how such a provider must be established.
The provider should be able to deal with complex data and navigation properties (one-to-many, etc.) and also save/delete/update them properly in the MySQL database.
The following is an example of how the database structure might look like:
Database Image
My questions are now:
Is there already an example with Breeze (+NodeJS) and MySQL that I could use?
Is there a documentation/sample how to write a own data source provider?
If I'm on my own, what should I look for when I create my provider?
There are plenty of Web API+EF+SQL samples, the Node+MongoDB sample you've already seen, a Ruby+SQL sample, and even a NoDB (and 3rd party data) sample ... but no Node+SQL sample yet.
These docs aren't spot on for your use case, but they will likely point you in the right direction:
ToDo Server
The docs are for Web API+EF+SQL, but good detail on how everything is wired together.
MongoDB
The MongoDB docs as well as the Zza! sample are pretty good about showing how they configured the Node server (to talk with MongoDB, sure, but you can see the process all the same).

How to connect properly to Google Cloud SQL using Pentaho Kettle

Good day,
I have just started using Pentaho's Kettle to try and connect to a Google Cloud SQL instance. I've noticed that after making the connection, the Test on Spoon says it's working, However, despite that the connection 'connects', it cannot pull the metadata about the tables or schemas inside.
Yes, I did enable the google sql tool before hand, which, by documentation says, allows 3rd party programs to access the Google App cloud. However, as I said, it can't seem to find any tables despite being able to 'connect'.
Has anyone else encountered this?
i found the problem with the help of someone from work. He posted our findings here. :) I hope it helps. It involves actually adding in JARs to your spoon
http://lorenzo-dee.blogspot.com/2013/04/kettle-pentaho-data-integration.html