public bool Remove(LocationTO entity) { if (entity is null) { throw new ArgumentNullException(nameof(entity)); } return(Remove(entity.LocationId)); }
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()); }
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 }); }
public LocationTO Update(LocationTO Entity) { if (Entity is null) { throw new ArgumentNullException(nameof(Entity)); } return(issuesContext .Locations .Update(Entity.ToEF()) .Entity .ToTransfertObject()); }