public ActionResult GoodEntry(string categoryId, string goodId) { return(View( string.IsNullOrEmpty(goodId) ? new Good { PartitionKey = categoryId } : goodService.GetById(goodId))); }
public override void Run() { while (true) { var message = queueService.GetMessage(); if (message == null) { Thread.Sleep(new TimeSpan(0, 1, 0)); } else { var good = goodService.GetById(message.AsString); good.IsApproved = true; goodService.InsertOrReplace(good); queueService.DeleteMessage(message.Id, message.PopReceipt); } } }