View CarbonFootprintCategoryGraphType.cs
public class CarbonFootprintCategoryGraphType : ObjectGraphType<ItemType> | |
{ | |
public CarbonFootprintCategoryGraphType() | |
{ | |
Name = "CarbonFootprintCategory"; | |
Field<NonNullGraphType<IntGraphType>>( | |
"id", | |
resolve: context => context.Source.Id | |
); | |
Field<NonNullGraphType<StringGraphType>>( |
View DataModels.cs
[TableName("ItemTypes")] | |
[PrimaryKey("Id", autoIncrement = true)] | |
[ExplicitColumns] | |
public class ItemType | |
{ | |
[Column("Id")] | |
[PrimaryKeyColumn(AutoIncrement = true)] | |
public int Id { get; set; } | |
[Column("Name")] |