Add a information on the jump that is a special jump

Add the "update" feature on the jump.
This commit is contained in:
Sébastien André
2021-04-21 15:16:10 +02:00
parent 4e89cb5340
commit 69c49ab011
5 changed files with 16 additions and 5 deletions

View File

@@ -25,5 +25,7 @@ namespace skydiveLogs_api.Domain
public string Notes { get; set; }
public DateTime JumpDate { get; set; }
public bool IsSpecial { get; set; }
}
}

View File

@@ -64,9 +64,14 @@ namespace skydiveLogs_api.DomainBusiness
return _jumpRepository.GetById(id);
}
public void UpdateJump(int id, Jump jump)
public void UpdateJump(int id, Jump updatedJump)
{
throw new NotImplementedException();
var myJump = GetJumpById(id);
myJump.IsSpecial = updatedJump.IsSpecial;
myJump.WithCutaway = updatedJump.WithCutaway;
myJump.Notes = updatedJump.Notes;
_jumpRepository.Update(myJump);
}
#endregion Public Methods

View File

@@ -60,7 +60,7 @@ namespace skydiveLogs_api.Infrastructure
public bool Update(Jump updatedJump)
{
throw new System.NotImplementedException();
return _col.Update(updatedJump);
}
public bool DeleteById(int id)

View File

@@ -23,5 +23,7 @@ namespace skydiveLogs_api.DataContract
public string Notes { get; set; }
public DateTime JumpDate { get; set; }
public bool IsSpecial { get; set; }
}
}

View File

@@ -23,5 +23,7 @@ namespace skydiveLogs_api.DataContract
public string Notes { get; set; }
public DateTime JumpDate { get; set; }
public bool IsSpecial { get; set; }
}
}