コード例 #1
0
        public int RemoveVenue(int id)
        {
            _venueRepository.Remove(id);

            Venue obj = _venueRepository.GetById(id);

            return(obj == null ? 1 : 0);
        }
コード例 #2
0
ファイル: VenueService.cs プロジェクト: Diieoy/simplex
        public VenueDTO GetById(int id)
        {
            var venue = repository.GetById(id);

            if (venue == null)
            {
                return(null);
            }

            return(new VenueDTO {
                Id = venue.Id, Name = venue.Name, Description = venue.Description, Address = venue.Address, Phone = venue.Phone
            });
        }