private static APIGatewayProxyResponse CreateAttachment(APIGatewayProxyRequest request) { var timelineEventAttachmentRequest = RequestHelper.ParsePutRequestBody <CreateTimelineEventAttachmentRequest>(request); ValidateTimelineEventAttachmentId(timelineEventAttachmentRequest.AttachmentId); ValidateTimelineEventAttachentTitle(timelineEventAttachmentRequest.Title); ValidateTimelineEventId(timelineEventAttachmentRequest.TimelineEventId); var model = new TimelineEventAttachmentModel { Id = timelineEventAttachmentRequest.AttachmentId, Title = timelineEventAttachmentRequest.Title, TimelineEventId = timelineEventAttachmentRequest.TimelineEventId }; GetRepo(timelineEventAttachmentRequest.TenantId).CreateTimlineEventAttachment(model); return(ResponseHelper.WrapResponse($"{JsonConvert.SerializeObject(model)}")); }
public void SaveModel(TimelineEventAttachmentModel model) { Context.SaveAsync(model).Wait();; }
public void DeleteModel(TimelineEventAttachmentModel model) { Context.DeleteAsync(model).Wait(); }
public void CreateTimlineEventAttachment(TimelineEventAttachmentModel model) { model.TenantId = TenantId; Context.SaveAsync(model).Wait(); }