n-tier-architecture

Decide enum storage which is uploaded to the server and shared by a Client app and an API

孤人 提交于 2020-05-30 08:42:36
问题 Technology stack : One REST API developed in .Net Core 3.1. Two client apps one in Android and other in iOS Scenario : Store enum value in the database such that when the data is uploaded to the API it makes sense (API can take decisions based on the enum). Option 1 : Store enum as a number and copy it in the API. In this scenario, the enum value would be saved in the DB and transferred to the API. When the API need to use the enum for a condition or some other use, it would use the copy of

Should my DAL return DataTables or I…whatever<>?

感情迁移 提交于 2020-01-24 20:27:05
问题 EDIT 1 I apologize but after reading the 2 suggested articles I still don't understand what I should use. I understand that using IQueryable is not preferred for various reasons but does that eliminate IEnumerable as well? Is a DataTable really my best option? In short, I guess, what is the preferred Return type? I have the following simple LINQ query that I want to abstract out into a DAL. What is the type of var and therefore what type should my method be? ConnectDBDataContext context = new

Datasnap : Is there a way to detect connection loss globally?

我与影子孤独终老i 提交于 2020-01-22 19:49:22
问题 I'm looking to detect local connection loss. Is there a mean to do that, as with the events on the Corelabs components ? Thanks EDIT: Sorry, I'm going to try to be more specific: I'm currently designing a prototype using datasnap 2009. So I've got a thin client, a stateless server app and a database server. What I would be able to do is to detect and handle connection loss (internet connectivity) between the client and the server app to handle it appropriately, ie: Display an informative

How To Maintain Transaction in N-Tier Architecture

余生颓废 提交于 2020-01-22 08:19:08
问题 I am developing application in N-Tier Architecture. as we all know that we need to implement transactions while insert/update/delete operation. please tell me how to use transaction in c#.net in N-Tier architecture. my architecture is like this Applicationform->middle_Layre->Factory->DataAccessLayre->StoredProcedure->Table in application form i create object of middleLayer and pass data in Insert/update/delete function of middle layer. i am creating object of sqlcommand in factoryclass and

How To Maintain Transaction in N-Tier Architecture

*爱你&永不变心* 提交于 2020-01-22 08:16:05
问题 I am developing application in N-Tier Architecture. as we all know that we need to implement transactions while insert/update/delete operation. please tell me how to use transaction in c#.net in N-Tier architecture. my architecture is like this Applicationform->middle_Layre->Factory->DataAccessLayre->StoredProcedure->Table in application form i create object of middleLayer and pass data in Insert/update/delete function of middle layer. i am creating object of sqlcommand in factoryclass and

How To Maintain Transaction in N-Tier Architecture

陌路散爱 提交于 2020-01-22 08:15:10
问题 I am developing application in N-Tier Architecture. as we all know that we need to implement transactions while insert/update/delete operation. please tell me how to use transaction in c#.net in N-Tier architecture. my architecture is like this Applicationform->middle_Layre->Factory->DataAccessLayre->StoredProcedure->Table in application form i create object of middleLayer and pass data in Insert/update/delete function of middle layer. i am creating object of sqlcommand in factoryclass and

Business Logic in Database versus Code? [closed]

安稳与你 提交于 2020-01-19 18:25:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . As a software engineer, I have a strong bias towards writing business logic in the application layer, while typically relying on the