Esempio n. 1
0
        private List <UserRefreshModel> PopulateLocationIds(List <UserRefreshModel> model)
        {
            var locations = _nsLocationManager.GetAllLocations();

            foreach (var l in model)
            {
                l.LocationId = locations.Where(lo => lo.LocationCity == l.Location).Select(li => li.Id).FirstOrDefault();
                if (l.LocationId.GetType() != typeof(int))
                {
                    l.LocationId = 0;
                }
            }


            return(model);
        }
Esempio n. 2
0
 /// <summary>
 /// Gets this instance.
 /// </summary>
 /// <returns></returns>
 public IEnumerable <NSLocation_vm> Get()
 {
     _logger.Info("Getting all locations.");
     return(_nsLocationManager.GetAllLocations());
 }