예제 #1
0
        public bool Remove(SectorTO entity)
        {
            if (entity is null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            return(Remove(entity.SectorId));
        }
예제 #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());
        }
예제 #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
            });
        }
예제 #4
0
        public SectorTO Update(SectorTO Entity)
        {
            if (Entity is null)
            {
                throw new ArgumentNullException(nameof(Entity));
            }

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