I am trying to use Core Data. I created a new entity with attributes but my Fetch Request always says it can't find it. I'd really appreciate the help
ContetView:
struct ContentView: View {
@FetchRequest(entity: Recipe.entity(), sortDescriptors: []) var recipes: FetchedResults<Recipe}
import SwiftUI
@main
struct Selfmade_KochbuchApp: App {
let persistenceController = PersistenceController.shared
var body: some Scene {
WindowGroup {
ContentView()
.environment(\.managedObjectContext, persistenceController.container.viewContext)
}
}
}