Forgot these two
This commit is contained in:
Oliver Booth 2023-08-11 14:26:38 +01:00
parent 2d4d6d3823
commit eb2edcb3f6
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61

View File

@ -74,7 +74,7 @@ public sealed class BlogService
/// </param>
/// <returns><see langword="true" /> if the author is found; otherwise, <see langword="false" />.</returns>
/// <exception cref="ArgumentNullException"><paramref name="post" /> is <see langword="null" />.</exception>
public bool TryGetAuthor(int id, [NotNullWhen(true)] out Author? author)
public bool TryGetAuthor(Guid id, [NotNullWhen(true)] out Author? author)
{
using BlogContext context = _dbContextFactory.CreateDbContext();
author = context.Authors.FirstOrDefault(a => a.Id == id);
@ -136,7 +136,7 @@ public sealed class BlogService
/// otherwise, <see langword="null" />.
/// </param>
/// <returns><see langword="true" /> if the post is found; otherwise, <see langword="false" />.</returns>
public bool TryGetBlogPost(int postId, [NotNullWhen(true)] out BlogPost? post)
public bool TryGetBlogPost(Guid postId, [NotNullWhen(true)] out BlogPost? post)
{
using BlogContext context = _dbContextFactory.CreateDbContext();
post = context.BlogPosts.FirstOrDefault(p => p.Id == postId);