public LoginResultModel WithError(string message, object data = null) { var err = new LoginError(); err.Message = message; //err.Data = data?.ToDotNetDictionary(); return(WithError(err)); }
public LoginResultModel WithError(LoginError error) { if (Errors == null) { Errors = new List <LoginError>(); } Errors.Add(error); return(this); }