コード例 #1
0
        public async Task <HttpResponseMessage> DeleteArrangements(EventRequest req)
        {
            if (req.Id != Guid.Empty)
            {
                if (req.Arrangements != null && req.Arrangements.Any())
                {
                    var ep = new EventProcessor(req.Id);
                    List <IArrangement> list = new List <IArrangement>();
                    foreach (var ar in req.Arrangements)
                    {
                        list.Add(ar);
                    }
                    await ep.DeleteArrangements(list);

                    return(new HttpResponseMessage()
                    {
                        StatusCode = System.Net.HttpStatusCode.OK
                    });
                }
            }
            return(new HttpResponseMessage(System.Net.HttpStatusCode.BadRequest));
        }