This file contains hidden or 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
import { | |
FormControl as ChakraFormControl, | |
FormControlProps as ChakraFormControlProps, | |
FormErrorMessage, | |
Text, | |
FormLabel, | |
FormLabelProps, | |
} from '@chakra-ui/react'; | |
import React, { ReactNode } from 'react'; |
This file contains hidden or 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 StreamingContext : DbContext | |
{ | |
public StreamingContext(DbContextOptions<StreamingContext> options) : base(options) { } | |
protected override void OnModelCreating(ModelBuilder modelBuilder) | |
{ | |
modelBuilder.Entity<Streamer>() | |
.HasMany(s => s.Subscribers) | |
.WithMany(s => s.Streamers) | |
.UsingEntity<Subscription>( |
This file contains hidden or 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 Subscriber | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public int Age { get; set; } | |
public ICollection<Subscription> Subscriptions { get; set; } | |
} | |
public class Streamer | |
{ |