DatePartAttribute class
namespace: Serenity.Data.Mapping assembly: Serenity.Net.Services
DatePart expression attribute
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public class DatePartAttribute : BaseExpressionAttribute
| parameter | description |
|---|---|
| expression | An expression that returns a date value |
| part | Datepart like "year", "month" etc. |
Public Members
| name | description |
|---|---|
| DatePartAttribute(…) | DatePart expression attribute |
| Expression { get; } | Date expression |
| Part { get; } | Date part |
| override Translate(…) |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | One of expressions is null |
Remarks
Creates a new instance
See Also
- class BaseExpressionAttribute
- Source: DatePartAttribute.cs