Esempio n. 1
0
        public bool Remove(SectorTO entity)
        {
            if (entity is null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            return(Remove(entity.SectorId));
        }
Esempio n. 2
0
        public SectorTO Add(SectorTO Entity)
        {
            if (Entity is null)
            {
                throw new ArgumentNullException(nameof(Entity));
            }

            var sector = Entity.ToEF();

            return(issuesContext.Sectors.Add(sector).Entity.ToTransfertObject());
        }
Esempio n. 3
0
        public static SectorEF ToEF(this SectorTO issue)
        {
            if (issue is null)
            {
                throw new ArgumentNullException(nameof(issue));
            }

            return(new SectorEF
            {
                SectorId = issue.SectorId,
                Name = issue.Name
            });
        }
Esempio n. 4
0
        public SectorTO Update(SectorTO Entity)
        {
            if (Entity is null)
            {
                throw new ArgumentNullException(nameof(Entity));
            }

            return(issuesContext
                   .Sectors
                   .Update(Entity.ToEF())
                   .Entity
                   .ToTransfertObject());
        }