Best practice to integrate existing MSSQL db into Umbraco? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
This is a general Umbraco architectural question, not a specific-to-the-line-of-code-question.
I am new to Umbraco but know my way around .net and asp.net mvc well.
For an upcoming project I am considering using Umbraco as a cms but as my experience with Umbraco is little, I cannot quite oversee what my options are when it comes to integrating an already existing mssql database.
The database that will support the Umbraco installation already has some tables present, containing product information. What is the best way to expose this data using the Umbraco api/models and subsequently integrate this data in Umbraco views?
E.g. can I create data models in the Umbraco admin and map those to the existing tables or is there another way that is considered to be a best practice?
Thank you.

I don't have a lot of first hand experience with this subject but I recently did an Umbraco bootcamp that covers exactly this, it's called "Umbraco Application Integration".
The course talks about Route Hijacking and contentfinders for mapping the external data into the umbraco request pipeline.
To call the external tables from you code, you can look into Umbraco's integrated lightweight orm called peta poco, but with a little work Entity Framework or nHibernate can also work.
To intergrate the external tables into you umbraco backend, there's a plugin called ui-o-matic that could help you out
Hopefully this puts you on the right track :)

Related

ASP.NET Identity to a remote database using RESTful API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm in a situation where I do not have the option to connect directly to a database (the typical ConnectionString and DBContext way), but instead, I'm forced to use a RESTful API to get and post data from, and to the database.
I difficult to explain, so here's a tiny architectural graph instead.
Easy to see, the web application can talk with the REST API, but it CANNOT connect directly to the database
PROBLEM
I'd love to use the built-in authentication system that ASP.NET Identity provides, but I'm going in completely blind. I have not been able to find any examples with REST API calls to get users, roles, etc.
I hope that some of you might be able to lend a hand. The architecture is as it is, and it's out of my hands to change it.
My team is currently using a similar system. Our solution was to use Authentication Forms, which we found easy to setup using this article. Granted it is a bit outdated, but it works for what we wanted to accomplish with a small amount of time.
Sorry, I know Its not much, but it was a very easy tutorial to follow. Feel free to ask for any more examples as you work through it!

Fastest Approach to Save and Read Data from Database in MVC [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am working on an application that needs to save and retrieve data fastly from database.I am using MVC5 razor view with C#.
Scenario may be like there is a post that can be like/unlike by any user and data will be store in database, also user can share that post. For example, facebook. on facebook we like/unlike posts and it is works very fast.
Can any one tell me which database tool**(Sql Server, MySql, Oracle etc)** should I use and which data approach**(Entity framework, Store Procedures, ORM, NoSql etc)** should I use in my scenario ?
Thanks in advance....
Selection of the database completely depends on you.
and it is also dependent on the cost as mysql is free of cost.
You have to identify your requirements and then need to select the database tool.
if you are only considering the speed then you need to read about Entity framework, Store Procedures, ORM, NoSql.
These are the different approaches used for differnt purpose
As Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a “virtual object database” that can be used from within the programming language.
So it completely dendends on your requirement.
But first i will suggest you to read more about these concepts.
thses two links will definitely help you to understand more.
https://kevinlawry.wordpress.com/2012/08/07/why-i-avoid-stored-procedures-and-you-should-too/
http://www.davidwaynebaxter.com/tech/dev/orm-or-sprocs/

PostgreSQL database interaction in C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a project in which I have a PostgreSQL database containing various tables and what not. I have a c# application that needs to be able to enter new data/change existing data/ or retrieve data from the database.
My question is, is there some tool/framework that I should be using to make this interaction easier. Currently, we have written a bunch of database helper functions to make various common operations simple in C#, we've written classes that define what a Column and Table are. We have defined data model classes for all the tables in the database as well as defined table classes corresponding to each data model class.
Basically, we written a lot of code just to be able to interface with the database and I feel like there has to be a simpler way. But maybe not! That's why I'm asking.
I saw some people using the Entity Framework but I'm not familiar with it and don't know if it does what I'm looking for. Also, it seemed like it was geared towards MySql and the free PostgreSql tool for it were a bit hacky.
The short answer is: you are probably already doing it the best way with current technologies.
I have tried several ORM solutions and all of them failed to live up to expectations on one level or another. Entity Framework is starting to get mature, but as you already found, the PostgreSQL adapters are essentially hacks since EF is baked for Microsoft SQL at a low level. One of the better ones I have used is Telerik's ORM, but it costs $$$$ and is far from perfect (http://www.telerik.com/data-access).
One to look at is this: https://www.nuget.org/packages/Shaolinq.Postgres.DotConnect/ Note though that is is an early version, I have not used it myself and generally use at your own risk:)
There are some code first and Node.js specific tools out there that are starting to get interesting, but in the end, having some decent reusable data access library and object classes is generally still the best solution for general use.

How do I design a notification system to be used across multiple websites? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Some background: We have 3 websites that are all part of a standard workflow. Each website handles a different part of the workflow.
Website 1 is for sales (pricing, sales, etc)
Website 2 is for engineers (implementation, coding, testing)
Website 3 is for reporting (used by all but primarily for administration and management)
We're gearing up to add notifications in a way that's a lot like how StackOverflow does notifications. I actually posted this on Meta Stackoverflow because that seemed like the best route, but the question didn't get very far. The notifications in our context would be things like "John Smith's timesheet is late" or "You have been assigned to a project"
Now I'm curious as to how other developers have set this up. I'm primarily worried about code repetition and maintenance at this stage.
Specifically, should each website be responsible for implementing its own notification client? That seems like it'd be really easy for code bases to get out of sync. But at the same time, even if you build a library you still need to handle the HTML templates somehow. How much duplication of functionality is acceptable? I'm at a loss here.
As you can tell, I'm not really sure where to start. If this were for a single website it'd be a different story, but implementing it across multiple websites at the same time has be puzzled.
Some miscellaneous facts about our stack:
Server side: ASP.NET MVC 4 (C#)
Cliebnt side: jQuery + Knockout
Database side: SQL Server w/ LINQ to SQL
IE not supported.
You can also do something like google +1 button. Link to a javascript common to everybody and have a custom html tag that will indicate where to put the data with configuration if needed.
Since you own all the websites, you can put everything in it's own .dll and add it to the solution of each solution.
Are you need something like Redis.io? There is Publish-subscribe in Redis.io.

Structuring an MVC project [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I find the way of "having controller/view in same project, all model in separate class library" not intuitive to me. I prefer to have it vertically, i.e. having related controllers/views/view model in separate projects.
So I look up the internet and find that some (not many) people are using the area feature, but I find it a pain when it comes to do routing.
So why can't I put controller/views/view models as separate projects instead of area? Am I not able to do that or does that decrease performance so nobody uses it?
You can structure the solution however you want. Everything is configurable to work the way you want. Furthermore, the way you structure your solution should have no effect on performance.
It's going to be much more straightforward to structure the solution the idiomatic, default way. Other users of MVC are already familiar with the default way, which makes for easy collaboration. Even if you feel another structure is better - even if it is better - you're still going to greatly benefit from tolerating the default structure.
You actually can move the views model and controllers to the other projects.
It is not something available out of the box.
You would need to create your own implementation of few MVC infrastructure classes like: ViewEngine, controller factory and etc. I wouldn't recommend going this way as you would have really hard time migrating your project to new versions of ASP.NET MVC and the classes which Microsoft supplies are well tested and optimized.

Categories

Resources