Open Closed

Can't use ScriptIgnore on IOuputDto ? #351


0
mrvithan created

I use AutoMapper and there are some fields that depend on 'Don't want' to output back to client. For example

public virtual string Exception {get;set;} public virtual bool IsSuccess { get { return string.IsNullOrEmpty(Exception); } }

I don't want to serialize Exception.


1 Answer(s)
  • 0
    hikalkan created
    Support Team

    You can use IgnoreMap attribute or manually create mapping and ignore the property in that mapping. You can find information on the web, for example: <a class="postlink" href="http://stackoverflow.com/questions/4987872/ignore-mapping-one-property-with-automapper">http://stackoverflow.com/questions/4987 ... automapper</a>