public void GetLocations()
        {
            //var plantLocations = Plants.Distinct();

            var plantLocations = Plants.Select(p => p.LocatedPlanted).Distinct();

            foreach (var plant in plantLocations)
            {
                Console.WriteLine($"{plant}");
            }
        }
Exemple #2
0
        public override void Merge(User entity, IRepository repository)
        {
            entity.Name  = Name;
            entity.Phone = Phone;
            entity.Email = Email;
            entity.Site  = Site;

            entity.ObjectGroups.Clear();
            entity.Plants.Clear();
            Groups.Select(repository.Get <ObjectGroup>).ToList().ForEach(x => entity.ObjectGroups.Add(x));
            Plants.Select(repository.Get <Plant>).ToList().ForEach(x => entity.Plants.Add(x));
        }