Search code examples
asp.net-mvcservicestackormlite-servicestack

How to Ignore properties for Db not for instance in ServiceStack.OrmLite


public class Message
{
    [AutoIncrement]
    public long Id { get; set; }

    public string Text { get; set; }

    public DateTime CreateDate { get; set; }

    [References(typeof(UserAuth))]
    public int FromId { get; set; }

    [Ignore]
    public UserName FromUserName {get;set;}

 }

When I use "Ignore" attribute framework Ignores the property during messaging. How can I write "Ignore it for Db persistance but don't ignore it messaging (serialization)". Or do I have to write new class for it.


Solution

  • There is no solution for now. Using Automapper can disburden.