refactor: pass DbContextOptions into context directly
turns out efcore doesn't like it when we create a new options instance (which includes a new data source *and* a new logger factory) every single time we create a context. this commit extracts OnConfiguring into static methods which are called when the context is added to the service collection and when it's manually created for migrations and the importer.
This commit is contained in:
		
							parent
							
								
									0077a165b5
								
							
						
					
					
						commit
						d982342ab8
					
				
					 5 changed files with 69 additions and 37 deletions
				
			
		|  | @ -2,7 +2,6 @@ using System.Net; | |||
| using System.Web; | ||||
| using Foxnouns.Backend.Database; | ||||
| using Foxnouns.Backend.Database.Models; | ||||
| using Minio.DataModel.ILM; | ||||
| using Duration = NodaTime.Duration; | ||||
| using J = System.Text.Json.Serialization.JsonPropertyNameAttribute; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue