19 lines
1.0 KiB
C#

namespace DigitalData.Core.Contracts.Application
{
/// <summary>
/// Represents the outcome of a service operation, extending IServiceMessage with the addition of a data payload.
/// This interface is generic, allowing for the specification of the type of data returned by the service operation.
/// It is used to communicate not just the success or failure of an operation, but also to return any relevant data
/// along with the operation's outcome.
/// </summary>
/// <typeparam name="T">The type of the data associated with the service operation's outcome. This could be a model,
/// a collection of models, or any other type relevant to the operation.</typeparam>
public interface IServiceResult<T> : IServiceMessage
{
/// <summary>
/// Gets or sets the data resulting from the service operation. This property is nullable to accommodate operations
/// that might not return data upon failure.
/// </summary>
T? Data { get; set; }
}
}