Store User data temporary on ASP.Net MVC - mysql

I'm doing an ASP.Net MVC website, but I need some help figuring out how to go about a problem I'm having. The problem is when the user is logged in (it gets the information from a MySQL database), I need it to save all the user's information and the company's info. But I need to access it from multiple Views and Models. So what is the correct way to use do something like that?

You can store that information in Global.asx so that it will be available anywhere in the project.
But the only thing is that you need to mention the properties in Global.asx before execution.

Related

Is it possible to make all database interaction within an app limited to read?

I have an existing Laravel application with various functions, controllers, authentication, middleware, CRUD, admin functionality, and more. I want to be able to deploy this application onto some hosting and have others view all of the pages, but I do not want them to be able to edit or create values in the database. So, for example, while I have CRUD for all of the resources, I want them to be able to read all of the resources but not edit, create, or delete anything. I also want them to not have to register/login, but I know how to fix that.
I have tried LOCK TABLE [tablename] READ in MySQL, but that does not seem to have done anything. Currently, my only other idea would be to go through and set ifs checking if the user is authenticated to save database interactions, but this would be a little laborious.
Is there any feasible or simpler way of doing this? Thanks for any help.

Creating individual user profiles

I am working on a project and one of the key components is creating customized user profiles. I already have a schema design for the user data that will generate said profile. But I am lost on how the technology works.
I am mostly front-end so it has been sort of overwhelming. The goal is to allow multiple user profile creations and so far I have only seen that this can be achievable via NodeJs or PHP. I have not found any guides.
I am not sure if I am asking the right questions.
Any help is appreciated. Thank you.
Since you mention you already have schema for the user table, I assume you are going to design your own database and backend node.js API to handle user profiles. You may want to build authentication functionalities in the future. If you are not familiar with Node.js yet, I recommend you to start with https://www.tutorialspoint.com/nodejs/index.htm. It's a good tutorial for beginners.
The whole purpose of a back-end node.js API is building numbers of service with specified route. Once a http request is made to a particular path, it takes parameters and execute some script. In you case the scripts will do something in database containing user profile data, for example, add a row in your data table. This operation is equivalent to creating a new user. Then, the API send response to front-end.
Keep in mind maintaining user profile data is nothing special than regular data. You should be able to pick it up with a couple of days training if you know javascriopt. But if you have to build authentication functionality you need more technologies.

Looking for hosting provider that exposes database as restful service

This may be a total shot in the dark, but looking for a service that basically exposes a database model as a restful service which we can query from the front-end (eliminating the need for a middle layer/server).
The idea would be simple enough, create a database with say a products table. This would then be exposed automatically via an API that represents that table. On your front end the user could enter text or choose several options and then via JS you could hit that endpoint (with the user's choices as parameters which inevitably becomes a SELECT and retrieves the data), that returns some JSON back in the form of results and via JS you display it on the front-end.
I have to believe something like this exists and maybe I am not being clear enough, but its basically an auto-created backend. This would be great for rapid prototyping.
Thanks in advance if anyone has ideas!

How to allow each user access his / her details of SSRS reports

I have around 200 users data in my database. I have generated reports for each user containing charts and tables etc. I want to allow each user to access his or her data using URI from our mobile app. Since the users are logged in the app I dont want to relogin them on the web page.
At the moment I think i will upload the SSRS reports to the webserver and using URI users can click a link in the app to direct to their webpage and see their data.
I dont have any idea of how to achieve it. Can you please give me suggesstion on how to achieve it in the best possible way. Any links, support etc will be highly appreciate.
I'm having trouble understanding your question. Are all of these users looking at a similar report, just different data? If so, there is a UserID built in field in SSRS, and you could use that as a hidden parameter to pass to your query.

twitter api updating status' and databases'

I'm trying to learn how to work with twitter api. I'm still a little confused. If I want users to tweet using my input text boxes on my site, do I still need a database for those tweets? Or does the api handle the storage for the tweets?
Thank you!
It is all about your requirement and then your design pattern. Infact You don't need any database to store tweets. In your case where you just want to tweet, You can do it without DB. Infact twitter-rest-api https://dev.twitter.com/docs/api is very good.
If you need to made frequent api call from your app, you can use caching to avoid too many frequent calls. For reference https://github.com/atsiddiqui/ReTweeted
You do not need a database to store the tweets. Twitter stores them.
Once you use the Twitter API to send the tweet data to Twitter.com, it is stored on Twitter.com's storage system. So, it is in a way handled by the api. It does not matter to Twitter whether you stored them in your own database or not.
But it is good practice to store the information in you own server database for record purpose. For example, you might want to know the statistics -- how many users use your service, what is the average use of it.
It may help investigating issues (sometimes legal) like when an user complains that your site published offensive tweet to his account. Then, you can track and check your database.
There are many more cases when you want to see the records in your system.