public Theater Create(TheaterCreateDto dto) { var isExist = GetDetail(dto.Name); if (isExist != null) { throw new Exception(dto.Name + " existed"); } var entity = new Theater { Name = FormatString.Trim_MultiSpaces_Title(dto.Name), Address = FormatString.Trim_MultiSpaces_Title(dto.Address) }; return(repository.Add(entity)); }
public Movie Post([FromBody] Movie movie) { return(_repo.Add(movie)); }