Added initialisation for User object to set First and Last names to an empty string.
removed line to check if user id is valid, as when creating a user id, it will be -1....
This commit is contained in:
parent
86a1618819
commit
4ac6b2475b
@ -7,6 +7,8 @@ namespace Interfaces
|
|||||||
public User()
|
public User()
|
||||||
{
|
{
|
||||||
AssociatedIdentifiers = new List<Identifier>();
|
AssociatedIdentifiers = new List<Identifier>();
|
||||||
|
FirstName = "";
|
||||||
|
LastName = "";
|
||||||
}
|
}
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public string FirstName { get; set; }
|
public string FirstName { get; set; }
|
||||||
|
|||||||
@ -114,7 +114,7 @@ namespace SQLiteRepository
|
|||||||
//TODO: add method which returns userId? maybe as ref?
|
//TODO: add method which returns userId? maybe as ref?
|
||||||
public OperationResponse UpdateUser(User user)
|
public OperationResponse UpdateUser(User user)
|
||||||
{
|
{
|
||||||
if(user.UserId <=0) return OperationResponse.FAILED;
|
//if(user.UserId <=0) return OperationResponse.FAILED;
|
||||||
|
|
||||||
var ret = OperationResponse.NONE;
|
var ret = OperationResponse.NONE;
|
||||||
var cardIds = new List<int>();
|
var cardIds = new List<int>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user