ServiceStack.Common.Tests.Models.ModelWithFieldsOfNullableTypes.CreateConstant C# (CSharp) Method

CreateConstant() public static method

public static CreateConstant ( int id ) : ModelWithFieldsOfNullableTypes
id int
return ModelWithFieldsOfNullableTypes
        public static ModelWithFieldsOfNullableTypes CreateConstant(int id)
        {
            var row = new ModelWithFieldsOfNullableTypes
            {
                Id = id,
                NId = id,
                NBool = id % 2 == 0,
                NDateTime = new DateTime(1979, (id % 12) + 1, (id % 28) + 1),
                NFloat = 1.11f + id,
                NDouble = 1.11d + id,
                NGuid = new Guid(((id % 240) + 16).ToString("X") + "7DA519-73B6-4525-84BA-B57673B2360D"),
                NLongId = 999 + id,
                NDecimal = id + 0.5m,
                NTimeSpan = TimeSpan.FromSeconds(id),
            };

            return row;
        }
ModelWithFieldsOfNullableTypes