Example #1
0
        private DBUser GetOwnerData()
        {
            if (OwnerId == null || Participents == null)
            {
                return(null);
            }
            var owner = Participents.FirstOrDefault(x => x.DBUser.Id == OwnerId);

            return(owner?.DBUser);
        }
Example #2
0
        public void Update()
        {
            var owner = GetOwnerData();

            if (owner != null)
            {
                OwnerName = owner.Name;
                Participents.Remove(Participents.FirstOrDefault(x => x.DBUser == owner));
            }
            AllParticipents = string.Join(",", Participents.Select(x => x.DBUser.Name));
        }