public Result <Descarga> PostDescarga(CreateDescarga request) { var d = GetByQuery <Descarga> (f => f.IdDiagnostico == request.Data.IdDiagnostico && f.Estado != "green"); if (d.Count > 0) { throw new Exception("Exiten descargas activas para el diagnostico seleccionado" .Fmt(request.Data.IdDiagnostico)); } request.Data.Fecha = DateTime.UtcNow; request.Data.Token = Store.CreateRandomPassword(); return(Post <Descarga> (request.Data)); }
public object Post(CreateDescarga request) { return(Store.PostDescarga(request)); }