This repository has been archived by the owner on Jul 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API implementation to create a member for auth (#86)
* Create Member Via API implementation * Add TODO to MemberController Co-Authored-By: Paul Scharnofske <[email protected]> * Improve generic usage in MemberControllerTests Co-Authored-By: Paul Scharnofske <[email protected]> * Remove Generic from Entity Result and Add DI Extensions to WebApp.Testing * Add migrations * Remake inital migration Co-authored-by: Paul Scharnofske <[email protected]>
- Loading branch information
Showing
12 changed files
with
9,421 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace Codidact.Core.Domain.Common | ||
{ | ||
public class EntityResult | ||
{ | ||
public List<string> Errors { get; set; } = new List<string>(); | ||
|
||
public bool Success { get; set; } | ||
|
||
public long? Id { get; set; } | ||
|
||
public EntityResult() | ||
{ | ||
|
||
} | ||
|
||
public EntityResult(bool success) | ||
{ | ||
Success = success; | ||
} | ||
|
||
public EntityResult(long id) | ||
{ | ||
Id = id; | ||
Success = true; | ||
} | ||
|
||
public EntityResult(params string[] error) | ||
{ | ||
Errors = error.ToList(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.