Database connection

nihon
Posts: 1
Joined: Sun Jan 31, 2016 6:59 am

Database connection

Postby nihon » Sun Jan 31, 2016 7:18 am

Hi,
I have to say that I like this Project to start with.

I plan to create a webpage where I want to have two datepicker Controls and automatically query a Database to list the results between the two dates.

If one mark a row in a datagrid Control, I want to load an image (filename taken from the db object) with overlayed svl Graphics in a separate image Control. I got stuck on accessing /setting up a DB.

I have realized that a very common way to solve this is to use entityframework in the backend and some jquery/angularjs as frontend.
What would be the recommended way to solve this using cshtml5? If I could get the db results into a list or better an observable Collection I believe it would be all solved.

Also I will have to listen to results over Telnet in backend and add the results to the DB. Also I will need a tab on the webpage that continously shows the latest image and results. I assume that is kind of handled automagically for me if I could push the latest results into an observable collection?

Any hints are welcome and if you beleive this is not to solve with cshtml5 then I am very pleased for any recommendations.


(I am newbie when it comes to web programming in general but has experience of WPF)

frank_lbt
Posts: 3
Joined: Tue Jul 19, 2016 3:33 pm

Re: Database connection

Postby frank_lbt » Wed Jul 20, 2016 3:06 am

I have this question too. Maybe you can use a sql nuget package but I don't know in this case if the js generated code will contain sql Id and password in clear to connect to database. This behaviour implies a security leak because anyone can see the source code of a webpage.

So anyone has already tested to build a website who connect to a database in a secure way because I m curious of how this can be made in cshtml?

Martint
Posts: 1
Joined: Tue Sep 13, 2016 2:02 pm

Re: Database connection

Postby Martint » Tue Sep 13, 2016 2:07 pm

HI Guys

I believe that the best way to connect to your DB would be through wcf which is supported and would normally be the way in a web based frontend.

Direct connecting to your db is not a great idea. but please don't shoot me.
hope this helps
thanks
Martint

koola
Posts: 3
Joined: Sun Dec 11, 2016 2:09 am

Re: Database connection

Postby koola » Sun Dec 11, 2016 2:19 am

You can use a DB simulator.


Return to “General Discussion and Other”

Who is online

Users browsing this forum: No registered users and 30 guests

 

 

cron