Timo Martinson
Timo Martinson
Explore posts from servers
DDeno
Created by Timo Martinson on 3/3/2024 in #help
How to start using data validation in kv?
type Post = {
title: string
slug: string
content: string
draft: boolean
publishedAt: Date
}
type Post = {
title: string
slug: string
content: string
draft: boolean
publishedAt: Date
}
6 replies
DDeno
Created by Timo Martinson on 3/3/2024 in #help
How to start using data validation in kv?
This is my model:
6 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
for me my example makes sense
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
so?
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
in Prisma I specify @@unique([slug, blogId]) ...
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
I am used to do so (in typescript and prisma)
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
not really
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
nope
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
I want the slug to be unique based on the blog
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
why not?
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
I did this:
modelBuilder.Entity<Post>((entity) => {
entity.HasIndex((p) => new { p.Slug, p.BlogId }).IsUnique();
});
modelBuilder.Entity<Post>((entity) => {
entity.HasIndex((p) => new { p.Slug, p.BlogId }).IsUnique();
});
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
thank you
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
good
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
oh. ok
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
and where?
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
how to set "order by"?
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
SORRY.
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
k
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
some examples?
47 replies
CC#
Created by Timo Martinson on 3/3/2024 in #help
Annotate Props for Entity Framework
then I configure everything in DbContext ?
47 replies