/// <inheritdoc/> public bool CanSaveLetter(Interfaces.LetterHeader letterHeader) { if (!(letterHeader is LetterHeader persistentHeader)) { return(false); } persistentHeader.Receiver = this.Context.Set <Character>().FirstOrDefault(c => c.Name == letterHeader.ReceiverName); return(persistentHeader.Receiver != null); }
/// <inheritdoc/> public bool CanSaveLetter(Interfaces.LetterHeader letterHeader) { if (!(letterHeader is LetterHeader persistentHeader)) { Log.Error($"Letter header is not of persistent type {typeof(LetterHeader)}."); return(false); } persistentHeader.Receiver = this.Context.Set <Character>().FirstOrDefault(c => c.Name == letterHeader.ReceiverName); return(persistentHeader.Receiver != null); }
/// <inheritdoc/> public bool CanSaveLetter(Interfaces.LetterHeader letterHeader) { return(true); }