add additional fields
This commit is contained in:
		| @@ -98,7 +98,6 @@ public class MeetingController : ControllerBase | ||||
|         await meeting.SpeackerImage.WriteFileToDirectory(); | ||||
|         var meetingWrite = meeting.Adapt<Meeting>(); | ||||
|         meetingWrite.SpeackerImage = meeting.SpeackerImage.JoinFileNames(); | ||||
|         meetingWrite.Splecializations = meeting.Splecializations.JoinStrings(); | ||||
|         await _applicationContext.Meetings.AddAsync(meetingWrite); | ||||
|  | ||||
|         await _applicationContext.SaveChangesAsync(); | ||||
| @@ -115,8 +114,7 @@ public class MeetingController : ControllerBase | ||||
|         await meeting.SpeackerImage.WriteFileToDirectory(); | ||||
|         var meetingWrite = meeting.Adapt<Meeting>(); | ||||
|         meetingWrite.SpeackerImage = meeting.SpeackerImage.JoinFileNames(); | ||||
|         meetingWrite.Splecializations = meeting.Splecializations.JoinStrings(); | ||||
|         var findedMeeting = await _applicationContext.Meetings.FirstAsync<Meeting>(s => s.Id == meeting.Id); | ||||
|         var findedMeeting = await _applicationContext.Meetings.FirstAsync(s => s.Id == meeting.Id); | ||||
|         findedMeeting = meetingWrite; | ||||
|  | ||||
|         await _applicationContext.SaveChangesAsync(); | ||||
|   | ||||
| @@ -19,7 +19,17 @@ public class PostMeetingDto | ||||
|  | ||||
|     public IEnumerable<IFormFile> SpeackerImage { get; set; } = null!; | ||||
|  | ||||
|     public IEnumerable<string> Splecializations { get; set; } = null!; | ||||
|     public string Splecializations { get; set; } = null!; | ||||
|  | ||||
|     public string Type { get; set; } = "онлайн/офлайн"; | ||||
|  | ||||
|     public string SpeakerTelephone { get; set; } = null!; | ||||
|  | ||||
|     public string SpeakerEmail { get; set; } = null!; | ||||
|  | ||||
|     public string Tags { get; set; } = null!; | ||||
|  | ||||
|     public string VideoUrl { get; set; } = null!; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -37,7 +47,18 @@ public class PutMeetingDto | ||||
|  | ||||
|     public IEnumerable<IFormFile> SpeackerImage { get; set; } = null!; | ||||
|  | ||||
|     public IEnumerable<string> Splecializations { get; set; } = null!; | ||||
|     public string Splecializations { get; set; } = null!; | ||||
|  | ||||
|  | ||||
|     public string Type { get; set; } = "онлайн/офлайн"; | ||||
|  | ||||
|     public string SpeakerTelephone { get; set; } = null!; | ||||
|  | ||||
|     public string SpeakerEmail { get; set; } = null!; | ||||
|  | ||||
|     public string Tags { get; set; } = null!; | ||||
|  | ||||
|     public string VideoUrl { get; set; } = null!; | ||||
| } | ||||
|  | ||||
| public class Meeting | ||||
| @@ -55,6 +76,17 @@ public class Meeting | ||||
|     public string SpeackerImage { get; set; } = null!; | ||||
|  | ||||
|     public string Splecializations { get; set; } = null!; | ||||
|  | ||||
|      | ||||
|     public string Type { get; set; } = "онлайн/офлайн"; | ||||
|  | ||||
|     public string SpeakerTelephone { get; set; } = null!; | ||||
|  | ||||
|     public string SpeakerEmail { get; set; } = null!; | ||||
|  | ||||
|     public string Tags { get; set; } = null!; | ||||
|  | ||||
|     public string VideoUrl { get; set; } = null!; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user