Added new many to many migration for libraries and users. Add Library now works and you can get Library (entity) objects from a user. LibraryDto project is upcoming.

This commit is contained in:
Joseph Milazzo 2020-12-18 12:01:45 -06:00
parent d5eed4e85d
commit b6e0e05205
9 changed files with 308 additions and 31 deletions

View file

@ -43,7 +43,8 @@ namespace API.Data
public async Task<AppUser> GetUserByUsernameAsync(string username)
{
return await _context.Users.SingleOrDefaultAsync(x => x.UserName == username);
return await _context.Users
.SingleOrDefaultAsync(x => x.UserName == username);
}
public async Task<IEnumerable<MemberDto>> GetMembersAsync()