ASP.NET MVC - WCF Classes for Models
ASP.NET | MVC 4 | C# | WCF
I am using WCF web services as an intermediary from the presentation layer
(MVC) to the data layer (Entity). To simplify moving data model data from
MVC to the web service I thought I would use proxy classes in WCF, so that
there would be one centralized class. Unfortunately, this caused the loss
of MVC decorations on properties within the model. Is there a good way to
create a centralized class for use with a model for the MVC view, and also
as a transport method to the WCF service?
Automapping came to mind as an option, but I believe that would require
two identical classes. One on the MVC side and one on the WCF side. Which
would still require me to make a change on both sides if a property
changed in a class.
Any other suggestions would be appreciated. Thanks!
EDIT:: Example
Here is model for a page that contains a table of records
public class ReconcileModel
{
#region PROPERTIES
public List<ReconcileItem> ReconcileItems { get; set;}
No comments:
Post a Comment