This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://localhost:44393/umbraco/management/api/v1/customAPI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://localhost:44393/umbraco/swagger/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://localhost:44393/umbraco/management/api/v1/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[VersionedApiBackOfficeRoute("customAPI")] | |
[ApiExplorerSettings(GroupName = "Custom Group")] | |
public class MyItemApiController : ManagementApiControllerBase | |
{ | |
public MyItemApiController() | |
{ | |
throw new NotImplementedException(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SwaggerRouteProductionPipelineFilter() : SwaggerRouteTemplatePipelineFilter("umbraco") | |
{ | |
protected override bool SwaggerIsEnabled(IApplicationBuilder applicationBuilder) => true; | |
} | |
public static class MyConfigureSwaggerRouteUmbracoBuilderExtensions | |
{ | |
public static IUmbracoBuilder ConfigureProductionSwaggerRoute(this IUmbracoBuilder builder) | |
{ | |
builder.Services.Configure<UmbracoPipelineOptions>(options => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fruits = new List<string> { "apple", "banana", "apple", "orange", "banana", "apple" }; | |
var fruitCount = fruits.GroupBy(fruit => fruit) | |
.Select(group => new { Fruit = group.Key, Count = group.Count() }) | |
.ToList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newProducts = new List<Product> | |
{ | |
new Product("Laptop", 999.99m) | |
}; | |
products.ExceptBy(newProducts.Select(p => p.Name), p => p.Name); | |
// "Smartphone", 699.99m) | |
// "Headphones", 199.99m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products.DistinctBy(x => x.Name) | |
// "Laptop", 999.99m), | |
// "Smartphone", 699.99m) | |
// "Smartwatch", 249.99m) | |
// "Tablet", 329.99m) | |
// "Camera", 499.99m) | |
// "Printer", 149.99m) | |
// "Monitor", 179.99m) | |
// "Keyboard", 89.99m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products.MinBy(f => f.Price); | |
// "Laptop", 999.99m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products.MinBy(f => f.Price) | |
// "Mouse", 49.99m |
NewerOlder