Esempio n. 1
0
        /// <summary>
        /// Creates a new support queue.
        /// </summary>
        /// <param name="newDataDto">the dto with the data for the new queue</param>
        /// <returns>the id of the new queue or 0 if failed</returns>
        public static async Task <int> CreateNewSupportQueueAsync(SupportQueueDto newDataDto)
        {
            var newSupportQueue = new SupportQueueEntity();

            newSupportQueue.UpdateFromSupportQueue(newDataDto);
            using (var adapter = new DataAccessAdapter())
            {
                var result = await adapter.SaveEntityAsync(newSupportQueue).ConfigureAwait(false);

                return(result ? newSupportQueue.QueueID : 0);
            }
        }