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 allDbSets = typeof(LeesStoreDbContext).GetProperties() | |
.Where(p => p.PropertyType.Name == "DbSet`1") | |
.Select(p => new | |
{ | |
Type = p.PropertyType.GetGenericArguments()[0], | |
p.Name | |
}) | |
.Where(p => p.Name != nameof(LeesStoreDbContext.Users)); | |
foreach (var property in allDbSets) |
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 static class LeesStoreDbContextModelCreatingExtensions | |
{ | |
public static void ConfigureLeesStore(this ModelBuilder builder) | |
{ | |
var allDbSets = typeof(LeesStoreDbContext).GetProperties() | |
.Where(p => p.PropertyType.Name == "DbSet`1") | |
.Select(p => new | |
{ | |
Type = p.PropertyType.GetGenericArguments()[0], | |
p.Name |
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
using System.Collections.Generic; | |
using System.Linq; | |
using Android.App; | |
using Android.Content; | |
using Android.Widget; | |
using Android.OS; | |
using Android.Views; | |
using Object = Java.Lang.Object; | |
namespace Droid.Sample |
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
open System | |
let totalRows = 9 | |
type Node = | |
{ Row: int; | |
Position: int; | |
Value: int | |
} |