Beispiel #1
0
        public bool Remove(LocationTO entity)
        {
            if (entity is null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            return(Remove(entity.LocationId));
        }
Beispiel #2
0
        public LocationTO Add(LocationTO Entity)
        {
            if (Entity is null)
            {
                throw new ArgumentNullException(nameof(Entity));
            }

            var location = Entity.ToEF();

            return(issuesContext.Locations.Add(location).Entity.ToTransfertObject());
        }
Beispiel #3
0
        public static LocationEF ToEF(this LocationTO issue)
        {
            if (issue is null)
            {
                throw new ArgumentNullException(nameof(issue));
            }

            return(new LocationEF
            {
                LocationId = issue.LocationId,
                Name = issue.Name
            });
        }
Beispiel #4
0
        public LocationTO Update(LocationTO Entity)
        {
            if (Entity is null)
            {
                throw new ArgumentNullException(nameof(Entity));
            }

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