예제 #1
0
 /// <summary>
 /// Add an police
 /// </summary>
 /// <param name="entity">police to insert</param>
 /// <returns></returns>
 public Police Add(Police entity)
 {
     //Validate address
     entity.Address = GetAddressName(entity.IdDepartment, entity.IdDistrict, entity.IdProvince);
     //Add a year to start date to get the end date
     entity.EndDate = entity.StartDate.Value.AddYears(1);
     return(_policeRepository.Add(entity));
 }
 public async Task Add(Police police)
 {
     await _policeRepository.Add(police);
 }