public async Task <Location> AddLocationAsync(Location location)
        {
            VerifyPermission(Permission.ManageLocations);

            location.Address   = location.Address.Trim();
            location.Name      = location.Name.Trim();
            location.SiteId    = GetCurrentSiteId();
            location.Telephone = location.Telephone?.Trim();
            location.Url       = location.Url?.Trim();

            return(await _locationRepository.AddSaveAsync(GetClaimId(ClaimType.UserId), location));
        }
Esempio n. 2
0
 public async Task <Location> AddLocation(Location location)
 {
     VerifyPermission(Permission.ManageLocations);
     location.SiteId = GetCurrentSiteId();
     return(await _locationRepository.AddSaveAsync(GetClaimId(ClaimType.UserId), location));
 }