dto

When using DTOs, Automapper & Nhibernate reflecting changes in child collections of DTO in domain object being updated

为君一笑 提交于 2019-12-20 17:29:21
问题 I'm not massively familiar with this design but I am hoping to get some guidance. I have a backend service that sends out DTOs to a WPF smart client. On the WPF smart client the user will change,delete and modify items and then the changes are sent back (client --> server). As an example, currently I am working on the Customer details form and the user has the ability to add,remove and change categories belonging to a customer in a datagrid. When the DTO is sent back to the server I would

What is the difference between DAL, DTO and DAO in a 3 tier architecture style including with MVC

可紊 提交于 2019-12-20 11:59:20
问题 Recently I was learning about ORM (Object Relational Mapping) and the 3 tier architecture style (presentation,business and data persistence ). If I understand correctly, I can separate the data persistence layer into DTO and DAO layer. I would like to understand, how the following parts works together in a data persistence layer. DAL (Data Access Layer) DTO (Data Transfer Object) DAO (Data Access Object) In a top of that I learnt that In larger applications MVC is the presentation tier only

Entity Framework + AutoMapper ( Entity to DTO and DTO to Entity )

时光总嘲笑我的痴心妄想 提交于 2019-12-20 08:18:50
问题 I've got some problems using EF with AutoMapper. =/ for example : I've got 2 related entities ( Customers and Orders ) and they're DTO classes : class CustomerDTO { public string CustomerID {get;set;} public string CustomerName {get;set;} public IList< OrderDTO > Orders {get;set;} } class OrderDTO { public string OrderID {get;set;} public string OrderDetails {get;set;} public CustomerDTO Customers {get;set;} } //when mapping Entity to DTO the code works Customers cust = getCustomer(id);

DDD using STE vs POCO

旧时模样 提交于 2019-12-20 06:39:02
问题 Developing n-layered application with DDD (o better DDDD because we are using WCF) using Microsoft technology (where we have full controll of all component), the best choise seems to be STE vs POCO (this last one force the usage of DTOs). That's right? In your opinion make sense the usage of STE with DTOs where we need them? Thanks. 回答1: I really can recommend Julie Lerman's Programming Entity Framework. She goes in depth about simple poco's, dto's and Self Tracking Entities. Advantages and

Where to place DTO <==> Entity translator in WCF service?

徘徊边缘 提交于 2019-12-20 05:15:18
问题 I have the following design : My Design My Design http://s15.postimg.org/3zha8rzqh/Design_Idea.png I will have a class called 'ProductDTO' in my service layer (the left service). When the 'Update Product ( ProductDTO )' operation contract is called - it should call the 'Update Product' function in the Business Logic Layer . In the database (the 'Data Access Layer' ) there is an entity called 'Product', and because I use LINQ-To-Entities I will also have a class there called 'Product'. My

PO BO VO DTO POJO

浪尽此生 提交于 2019-12-20 04:38:12
这些 Object 的指导思想是“分层(持久层,业务层,视图层等)”概念 PO Persistant Object 最形象的理解就是一个PO就是数据库中的一条记录 好处是可以把一条记录作为一个对象处理,可以方便的转为其它对象 BO Business Object 主要作用是把业务逻辑封装为一个对象。这个对象可以包括一个或多个其它的对象 比如一个简历,有教育经历、工作经历、社会关系等等 我们可以把教育经历对应一个PO,工作经历对应一个PO,社会关系对应一个PO 建立一个对应简历的BO对象处理简历,每个BO包含这些PO 这样处理业务逻辑时,我们就可以针对BO去处理 VO Value Object View Object 主要对应界面显示的数据对象。对于一个WEB页面,或者SWT、SWING的一个界面,用一个VO对象对应整个界面的值 DTO Data Transfer Object 主要用于远程调用等需要大量传输对象的地方 比如我们一张表有100个字段,那么对应的PO就有100个属性 但是我们界面上只要显示10个字段 客户端用WEB service来获取数据,没有必要把整个PO对象传递到客户端 这时我们就可以用只有这10个属性的DTO来传递结果到客户端,这样也不会暴露服务端表结构.到达客户端以后,如果用这个对象来对应界面显示,那此时它的身份就转为VO POJO Plain

NHibernate - flagging specific properties as 'dirty'

非 Y 不嫁゛ 提交于 2019-12-20 04:25:44
问题 I am working on an NHibernate project and have a question regarding updating transient entities. Basically the workflow is as follows: Create a DTO (projection) and send over the wire to client. This has a small subset of properties from the entity. Client sends back the changed DTO Map the DTO properties back onto the appropriate enitity so an UPDATE statement can be generated and executed by NH. Save the entity Point 4 is where I have the issue. Currently I can achieve this update using the

Should SDO (Service Data Object) be adopted in new project?

China☆狼群 提交于 2019-12-19 11:04:11
问题 I've been programming in Delphi with Midas/DataSnap for quite long time and quite happy with it. Moving to .NET I'm more than happy with the ADO.NET DataSet. For CRUD application, I'm highly uncomfortable with any kind of ORM. Generic data-structure with automatic diff/delta handling get my job done better for me, an average database application developer. Tried to study Java years ago, and could not find similar idea implemented. The closest I could find is SDO (Service Data Object). I

What is DTO equivalent term for objects returned from DAL?

Deadly 提交于 2019-12-19 11:01:37
问题 I'm already using DTO's for data transfer over a network. Now I'm also introducing different DTO-like classes to the DAL. This is to avoid passing the application (business) objects across layers. To avoid naming confusion, I would like to use another term than DTO but can't find a good one. What is DTO equivalent term for objects returned from DAL? 回答1: "What's in a name? that which we call a rose by any other name would smell as sweet." - William Shakespeare Also, what Martin Fowler says

What is DTO equivalent term for objects returned from DAL?

会有一股神秘感。 提交于 2019-12-19 11:01:29
问题 I'm already using DTO's for data transfer over a network. Now I'm also introducing different DTO-like classes to the DAL. This is to avoid passing the application (business) objects across layers. To avoid naming confusion, I would like to use another term than DTO but can't find a good one. What is DTO equivalent term for objects returned from DAL? 回答1: "What's in a name? that which we call a rose by any other name would smell as sweet." - William Shakespeare Also, what Martin Fowler says