Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thebetterjort/8b84af184a7cb93b0e4435af7ab3a28e to your computer and use it in GitHub Desktop.
Save thebetterjort/8b84af184a7cb93b0e4435af7ab3a28e to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
using System.Threading.Tasks;
using AutoMapper;
using CalendarService.API.Context;
using CalendarService.API.Data;
using CalendarService.API.Dtos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System;
using System.Xml.Linq;
using System.Net;
using Ical.Net;
using Ical;
using Ical.Net.DataTypes;
using Ical.Net.Serialization;
using Ical.Net.Evaluation;
using Ical.Net.Utility;
using Ical.Net.Serialization.iCalendar.Serializers;
using CalendarService.API.Helpers;
namespace CalendarService.API.Controllers
{
[Route("api/[Controller]")]
[ApiController]
public class ICalController : ControllerBase
{
private readonly ICalendarServiceRepository _repo;
private readonly IMapper _mapper;
private readonly CalendarServiceContext db;
public ICalController(
ICalendarServiceRepository repo,
IMapper mapper,
CalendarServiceContext context
)
{
_mapper = mapper;
db = context;
_repo = repo;
}
[HttpGet("judges")]
public async Task<ActionResult<IEnumerable<JudgesForListDTO>>> GetJudgesAsync()
{
var Judges = await _repo.GetJudgesAsync();
var JudgesToReturn = _mapper.Map<IEnumerable<JudgesForListDTO>>(Judges);
return Ok(JudgesToReturn);
}
[HttpGet("feed")]
public async Task<IActionResult> GetSchedule()
{
DateTime today = DateTime.Now;
string desde = today.AddDays(-3).ToShortDateString();
string hasta = today.AddDays(+20).ToShortDateString();
db.Database.SetCommandTimeout(0);
var src = await (
from sd in db.u_schedule
join r1 in db.codes
on new { col_a = sd.sd_loc, col_b = "location" }
equals new { col_a = r1.co_code, col_b = r1.co_type } into child1
from loc in child1.DefaultIfEmpty()
join r2 in db.deadlines on new { col_a = sd.sd_class, col_b = sd.sd_type } equals new { col_a = r2.dl_class, col_b = r2.dl_type } into child2
from dl in child2.DefaultIfEmpty()
join r3 in db.u_person on new { col_a = sd.sd_judge_prid ?? 0, col_b = "jud" } equals new { col_a = r3.pr_prid, col_b = r3.pr_type } into child3
from jud in child3.DefaultIfEmpty()
join r4 in db.u_case on sd.sd_caseid equals r4.cs_caseid into child4
from cs in child4.DefaultIfEmpty()
join r41 in db.u_case on new
{ col_a = cs.cs_sort_year, col_b = cs.cs_type, col_c = cs.cs_number, col_d = cs.cs_office, col_e = 0 }
equals new
{ col_a = r41.cs_sort_year, col_b = r41.cs_type, col_c = r41.cs_number, col_d = r41.cs_office, col_e = r41.cs_def_num } into child41
from cs2 in child41.DefaultIfEmpty()
join r42 in db.codes on new { col_a = cs.cs_office, col_b = "office" } equals new { col_a = r42.co_code, col_b = r42.co_type } into child42
from ofi in child42.DefaultIfEmpty()
join r5 in db.u_party on new { col_a = sd.sd_caseid, col_b = 0 } equals new { col_a = r5.py_caseid, col_b = r5.py_aliaseq } into child5
from pty in child5.DefaultIfEmpty()
join r6 in db.roletype on pty.py_role equals r6.ro_code into child6
from rt in child6.DefaultIfEmpty()
join r7 in db.u_attorney on new { col_a = pty.py_caseid, col_b = pty.py_seqno } equals new { col_a = r7.at_caseid, col_b = r7.at_party_seqno } into child7
from aty in child7.DefaultIfEmpty()
join r8 in db.u_party on new { col_a = pty.py_caseid, col_b = pty.py_seqno, col_c = "aka" } equals new { col_a = r8.py_caseid, col_b = r8.py_seqno, col_c = r8.py_alias_type } into child8
from aka in child8.DefaultIfEmpty()
join r9 in db.u_cr_location on pty.py_caseid equals r9.loc_caseid into child9
from usm in child9.DefaultIfEmpty()
where (sd.sd_dtset >= DateTime.Parse(desde) && sd.sd_dtset <= DateTime.Parse(hasta))
&& (sd.sd_class == "appt" || sd.sd_class == "hrg")
&& (rt.ro_code == "pla" || rt.ro_code == "dft")
&& sd.sd_date_term == null
&& usm.loc_date_end == null
let hh = Int32.Parse((sd.sd_tmset == null ? "00:00" : sd.sd_tmset).Substring(0, 2))
let hh2 = sd.sd_tmset_am_pm == null ? 0 : sd.sd_tmset_am_pm.ToLower() == "pm" ? 12 : 0
let mm = Int32.Parse((sd.sd_tmset == null ? "00:00" : sd.sd_tmset).Substring(3, 2))
let dt = sd.sd_dtset.Value.AddHours(hh).AddHours(hh2).AddMinutes(mm)
orderby jud.pr_last_name, jud.pr_first_name, dt, pty.py_role descending, cs.cs_case_number, pty.py_def_num, pty.py_last_name, aty.at_last_name, aty.at_first_name
// let case_num = cs.cs_case_number ?? ""
select new
{
loc_code = loc.co_code ?? "",
loc_description = (loc.co_translation ?? "").Replace("&#039;", "'"),
loc_description_long = (loc.co_misc ?? "").Replace("&#039;", "'"),
event_description = (dl.dl_description ?? "").Trim(),
event_date = dt,
event_date_term = sd.sd_date_term,
sd_text = sd.sd_text ?? "",
short_title = cs2.cs_short_title != null ? cs2.cs_short_title : cs.cs_short_title != null ? cs.cs_short_title : "",
jud_id = sd.sd_judge_prid,
jud_fullname = string.Format("{0} {1} {2}", (jud.pr_first_name ?? "").Trim(), (jud.pr_middle_name ?? "").Trim(), (jud.pr_last_name ?? "").Trim()),
jud_initials = (jud.pr_initials ?? "").Trim(),
office_code = ofi.co_code ?? "",
office_description = ofi.co_translation ?? "",
office_description_long = ofi.co_misc ?? "",
case_number = (cs.cs_case_number ?? "").Trim().ToUpper().Substring(0, 13),
pty.py_def_num,
py_first_name = (pty.py_first_name ?? "").Trim(),
py_middle_name = (pty.py_middle_name ?? "").Trim(),
py_last_name = (pty.py_last_name ?? "").Trim(),
prisoner_location =
(usm.loc_code ?? "").Trim() == "LC" ? "(UC)" :
(usm.loc_code ?? "").Trim() == "LR" ? "(UB)" : "",
prisoner_id = (pty.py_prisoner_id ?? "").Trim(),
aka_fullname = string.Format("{0} {1} {2}", (aka.py_first_name ?? "").Trim(), (aka.py_first_name ?? "").Trim(), (aka.py_last_name ?? "").Trim()).Trim(),
py_role = (pty.py_role ?? "").Trim(),
ro_description = (rt.ro_description ?? "").Trim(),
ro_description_plu = (rt.ro_description_plu ?? "").Trim(),
at_first_name = (aty.at_first_name ?? "").Trim(),
at_middle_name = (aty.at_middle_name ?? "").Trim(),
at_last_name = (aty.at_last_name ?? "").Trim(),
at_start_date = aty.at_start_date,
at_end_date = aty.at_end_date
})
.Distinct().ToListAsync();
var tmp1 = src
.GroupBy(g => new
{
g.loc_code,
g.loc_description,
g.loc_description_long,
g.event_description,
g.event_date,
g.event_date_term,
g.sd_text,
g.short_title,
g.jud_id,
g.jud_fullname,
g.jud_initials,
g.office_code,
g.office_description,
g.office_description_long,
g.case_number,
g.py_def_num,
g.py_first_name,
g.py_middle_name,
g.py_last_name,
g.prisoner_location,
g.prisoner_id,
g.py_role,
g.ro_description,
g.ro_description_plu,
g.at_first_name,
g.at_middle_name,
g.at_last_name,
g.at_start_date,
g.at_end_date
})
.Select(o => new
{
o.Key.loc_code,
o.Key.loc_description,
o.Key.loc_description_long,
o.Key.event_description,
o.Key.event_date,
o.Key.event_date_term,
sd_text = o.Key.sd_text ?? "[CASE SECTION]",
o.Key.short_title,
o.Key.jud_id,
o.Key.jud_fullname,
o.Key.jud_initials,
o.Key.office_code,
o.Key.office_description,
o.Key.office_description_long,
o.Key.case_number,
o.Key.py_def_num,
o.Key.py_first_name,
o.Key.py_middle_name,
o.Key.py_last_name,
o.Key.prisoner_location,
o.Key.prisoner_id,
akas = o.Aggregate(new System.Text.StringBuilder(), (cur, nxt) => cur.AppendFormat(", {0}", nxt.aka_fullname)).ToString().Substring(2),
o.Key.py_role,
o.Key.ro_description,
o.Key.ro_description_plu,
o.Key.at_first_name,
o.Key.at_middle_name,
o.Key.at_last_name,
o.Key.at_start_date,
o.Key.at_end_date
});
var tmp2 = tmp1.GroupBy(
a => new
{
a.office_code,
a.office_description,
a.office_description_long,
a.jud_initials,
a.jud_fullname,
a.event_description,
a.event_date,
a.loc_description,
}
).Select(
alpha => new
{
alpha.Key.office_code,
alpha.Key.office_description,
alpha.Key.office_description_long,
alpha.Key.jud_initials,
alpha.Key.jud_fullname,
alpha.Key.event_description,
alpha.Key.event_date,
alpha.Key.loc_description,
cnt = alpha.Count(),
cases = alpha.GroupBy(b => new
{
b.short_title
}).Select(bravo => new
{
bravo.Key.short_title,
cnt = bravo.Count(),
roles = bravo.GroupBy(c => new
{
c.ro_description,
c.ro_description_plu
}).Select(charlie => new
{
role = charlie.Key.ro_description,
role_plu = charlie.Key.ro_description_plu,
cnt = charlie.Count(),
parties = charlie.GroupBy(d => new
{
d.case_number,
d.py_def_num,
d.py_first_name,
d.py_middle_name,
d.py_last_name
}).Select(delta => new
{
delta.Key.case_number,
delta.Key.py_def_num,
delta.Key.py_first_name,
delta.Key.py_middle_name,
delta.Key.py_last_name
})
})
})
}
);
var str = new System.Text.StringBuilder();
var myCal = new Ical.Net.Calendar();
foreach (var proceedings in tmp2)
{
str = new System.Text.StringBuilder();
str.Append(string.Format("Office \t: {0}-{1} {2}",
proceedings.office_code.ToString().Trim(),
proceedings.office_description.ToString().Trim(),
proceedings.office_description_long
));
str.Append("\n");
str.Append(string.Format("Judge \t: {0}", proceedings.jud_fullname));
str.Append("\n");
str.Append(string.Format("Event \t: {0}", proceedings.event_description));
str.Append("\n");
str.Append(new string('-', 60));
str.Append("\n");
foreach (var cases in proceedings.cases)
{
str.Append(string.Format("{0} \n", cases.short_title));
// str.Append("\n");
// str.Append("\n");
// str.Append("--\n");
foreach (var roles in cases.roles)
{
str.Append(string.Format("\t{0} ({1}) \n", roles.role, roles.role_plu));
// str.Append("\n");
foreach (var parties in roles.parties)
{
str.Append(string.Format("\t\t {0}-{1} : {2} {3} {4} ",
parties.case_number,
parties.py_def_num,
parties.py_first_name,
parties.py_middle_name,
parties.py_last_name
).Replace(" ", " ").Replace("- :", " :"));
str.Append("\n");
}
}
}
string zone = Environment.GetEnvironmentVariable("TZ");
var evt = new CalendarEvent()
{
Class = "PUBLIC",
Start = new Ical.Net.DataTypes.CalDateTime(
Convert.ToDateTime(proceedings.event_date.ToString()), zone
),
End = new Ical.Net.DataTypes.CalDateTime(
Convert.ToDateTime(proceedings.event_date.ToString()), zone
),
Summary = string.Format("{0}-{1}\n",
proceedings.jud_initials.ToString().Trim(),
proceedings.event_description.ToString().Trim()
),
Description = str.ToString(),
Location = string.Format("{0}", proceedings.loc_description.ToString().Trim())
};
myCal.Events.Add(evt);
}
var serializer = new CalendarSerializer(new SerializationContext());
var icalString = serializer.SerializeToString(myCal);
return new ContentResult
{
ContentType = "text/calendar",
StatusCode = (int)HttpStatusCode.OK,
Content = icalString.ToString()
};
// return Ok(tmp2);
// var str = new System.Text.StringBuilder();
// var myCal = new Ical.Net.Calendar();
// foreach (var dr in tmp2)
// {
// str = new System.Text.StringBuilder();
// str.Append(string.Format("Office \t: {0}-{1} {2}",
// dr.office_code.ToString().Trim(),
// dr.office_description.ToString().Trim(),
// dr.office_description_long
// ));
// str.Append("\n");
// str.Append(string.Format("Judge \t: {0}", dr.jud_fullname));
// str.Append("\n");
// str.Append(string.Format("Event \t: {0}", dr.event_description));
// str.Append("\n");
// str.Append(string.Format("Title \t: {0}\n", dr.short_title));
// str.Append("\n");
// str.Append(new string('-', 60));
// str.Append("\n");
// foreach (var subitem in dr.roles)
// {
// foreach (var subitem2 in subitem.cases)
// {
// str.Append(string.Format("{0} : \t {1}-{2} : {3} {4} {5} \n",
// subitem.ro_description_plu,
// subitem2.case_number,
// subitem2.py_def_num,
// subitem2.py_first_name,
// subitem2.py_middle_name,
// subitem2.py_last_name
// ).Replace(" ", " ").Replace("- :", " :"));
// }
// }
// str.Append(new string('-', 60));
// str.Append("\n");
// string zone = "America/Puerto_Rico";
// var evt = new CalendarEvent()
// {
// Class = "PUBLIC",
// Start = new Ical.Net.DataTypes.CalDateTime(
// Convert.ToDateTime(dr.event_date.ToString()), zone
// ),
// End = new Ical.Net.DataTypes.CalDateTime(
// Convert.ToDateTime(dr.event_date.ToString()), zone
// ),
// Summary = string.Format("{0}-{1}\n",
// dr.jud_initials.ToString().Trim(),
// dr.event_description.ToString().Trim()
// ),
// Description = str.ToString(),
// Location = string.Format("{0}", dr.loc_description.ToString().Trim())
// };
// myCal.Events.Add(evt);
// }
// var serializer = new CalendarSerializer(new SerializationContext());
// var icalString = serializer.SerializeToString(myCal);
// return new ContentResult
// {
// ContentType = "text/calendar",
// StatusCode = (int)HttpStatusCode.OK,
// Content = icalString.ToString()
// };
// return Ok(tmp2);
// var serializer = new Ical.Net.Serialization.CalendarSerializer();
// String output = serializer.SerializeToString(myCal);
// XElement doc = new XElement("html",
// new XElement("head", new XElement("title", "Schedule")),
// new XElement("body", new XElement("div", "Loading...."))
// );
// return Ok(doc.ToString());
// return Ok(tmp2);
// return new ContentResult {
// ContentType="text/html",
// StatusCode=(int) HttpStatusCode.OK,
// Content=doc.ToString()
// };
}
[HttpGet("feed/{judgeprid}")]
public async Task<IActionResult> GetSchedule(int judgeprid)
{
DateTime today = DateTime.Now;
string desde = today.AddDays(-3).ToShortDateString();
string hasta = today.AddDays(+20).ToShortDateString();
db.Database.SetCommandTimeout(0);
var src = await (
from sd in db.u_schedule
join r1 in db.codes
on new { col_a = sd.sd_loc, col_b = "location" }
equals new { col_a = r1.co_code, col_b = r1.co_type } into child1
from loc in child1.DefaultIfEmpty()
join r2 in db.deadlines on new { col_a = sd.sd_class, col_b = sd.sd_type } equals new { col_a = r2.dl_class, col_b = r2.dl_type } into child2
from dl in child2.DefaultIfEmpty()
join r3 in db.u_person on new { col_a = sd.sd_judge_prid ?? 0, col_b = "jud" } equals new { col_a = r3.pr_prid, col_b = r3.pr_type } into child3
from jud in child3.DefaultIfEmpty()
join r4 in db.u_case on sd.sd_caseid equals r4.cs_caseid into child4
from cs in child4.DefaultIfEmpty()
join r41 in db.u_case on new
{ col_a = cs.cs_sort_year, col_b = cs.cs_type, col_c = cs.cs_number, col_d = cs.cs_office, col_e = 0 }
equals new
{ col_a = r41.cs_sort_year, col_b = r41.cs_type, col_c = r41.cs_number, col_d = r41.cs_office, col_e = r41.cs_def_num } into child41
from cs2 in child41.DefaultIfEmpty()
join r42 in db.codes on new { col_a = cs.cs_office, col_b = "office" } equals new { col_a = r42.co_code, col_b = r42.co_type } into child42
from ofi in child42.DefaultIfEmpty()
join r5 in db.u_party on new { col_a = sd.sd_caseid, col_b = 0 } equals new { col_a = r5.py_caseid, col_b = r5.py_aliaseq } into child5
from pty in child5.DefaultIfEmpty()
join r6 in db.roletype on pty.py_role equals r6.ro_code into child6
from rt in child6.DefaultIfEmpty()
join r7 in db.u_attorney on new { col_a = pty.py_caseid, col_b = pty.py_seqno } equals new { col_a = r7.at_caseid, col_b = r7.at_party_seqno } into child7
from aty in child7.DefaultIfEmpty()
join r8 in db.u_party on new { col_a = pty.py_caseid, col_b = pty.py_seqno, col_c = "aka" } equals new { col_a = r8.py_caseid, col_b = r8.py_seqno, col_c = r8.py_alias_type } into child8
from aka in child8.DefaultIfEmpty()
join r9 in db.u_cr_location on pty.py_caseid equals r9.loc_caseid into child9
from usm in child9.DefaultIfEmpty()
where (sd.sd_dtset >= DateTime.Parse(desde)
&& sd.sd_dtset <= DateTime.Parse(hasta))
&& sd.sd_judge_prid == judgeprid
&& (sd.sd_class == "appt" || sd.sd_class == "hrg")
&& (rt.ro_code == "pla" || rt.ro_code == "dft")
&& sd.sd_date_term == null
&& usm.loc_date_end == null
let hh = Int32.Parse((sd.sd_tmset == null ? "00:00" : sd.sd_tmset).Substring(0, 2))
let hh2 = sd.sd_tmset_am_pm == null ? 0 : sd.sd_tmset_am_pm.ToLower() == "pm" ? 12 : 0
let mm = Int32.Parse((sd.sd_tmset == null ? "00:00" : sd.sd_tmset).Substring(3, 2))
let dt = sd.sd_dtset.Value.AddHours(hh).AddHours(hh2).AddMinutes(mm)
orderby jud.pr_last_name, jud.pr_first_name, dt, pty.py_role descending, cs.cs_case_number, pty.py_def_num, pty.py_last_name, aty.at_last_name, aty.at_first_name
// let case_num = cs.cs_case_number ?? ""
select new
{
loc_code = loc.co_code ?? "",
loc_description = (loc.co_translation ?? "").Replace("&#039;", "'"),
loc_description_long = (loc.co_misc ?? "").Replace("&#039;", "'"),
event_description = (dl.dl_description ?? "").Trim(),
event_date = dt,
event_date_term = sd.sd_date_term,
sd_text = sd.sd_text ?? "",
short_title = cs2.cs_short_title != null ? cs2.cs_short_title : cs.cs_short_title != null ? cs.cs_short_title : "",
jud_id = sd.sd_judge_prid,
jud_fullname = string.Format("{0} {1} {2}", (jud.pr_first_name ?? "").Trim(), (jud.pr_middle_name ?? "").Trim(), (jud.pr_last_name ?? "").Trim()),
jud_initials = (jud.pr_initials ?? "").Trim(),
office_code = ofi.co_code ?? "",
office_description = ofi.co_translation ?? "",
office_description_long = ofi.co_misc ?? "",
case_number = (cs.cs_case_number ?? "").Trim().ToUpper().Substring(0, 13),
pty.py_def_num,
py_first_name = (pty.py_first_name ?? "").Trim(),
py_middle_name = (pty.py_middle_name ?? "").Trim(),
py_last_name = (pty.py_last_name ?? "").Trim(),
prisoner_location =
(usm.loc_code ?? "").Trim() == "LC" ? "(UC)" :
(usm.loc_code ?? "").Trim() == "LR" ? "(UB)" : "",
prisoner_id = (pty.py_prisoner_id ?? "").Trim(),
aka_fullname = string.Format("{0} {1} {2}", (aka.py_first_name ?? "").Trim(), (aka.py_first_name ?? "").Trim(), (aka.py_last_name ?? "").Trim()).Trim(),
py_role = (pty.py_role ?? "").Trim(),
ro_description = (rt.ro_description ?? "").Trim(),
ro_description_plu = (rt.ro_description_plu ?? "").Trim(),
at_first_name = (aty.at_first_name ?? "").Trim(),
at_middle_name = (aty.at_middle_name ?? "").Trim(),
at_last_name = (aty.at_last_name ?? "").Trim(),
at_start_date = aty.at_start_date,
at_end_date = aty.at_end_date
})
.Distinct().ToListAsync();
var tmp1 = src
.GroupBy(g => new
{
g.loc_code,
g.loc_description,
g.loc_description_long,
g.event_description,
g.event_date,
g.event_date_term,
g.sd_text,
g.short_title,
g.jud_id,
g.jud_fullname,
g.jud_initials,
g.office_code,
g.office_description,
g.office_description_long,
g.case_number,
g.py_def_num,
g.py_first_name,
g.py_middle_name,
g.py_last_name,
g.prisoner_location,
g.prisoner_id,
g.py_role,
g.ro_description,
g.ro_description_plu,
g.at_first_name,
g.at_middle_name,
g.at_last_name,
g.at_start_date,
g.at_end_date
})
.Select(o => new
{
o.Key.loc_code,
o.Key.loc_description,
o.Key.loc_description_long,
o.Key.event_description,
o.Key.event_date,
o.Key.event_date_term,
sd_text = o.Key.sd_text ?? "[CASE SECTION]",
o.Key.short_title,
o.Key.jud_id,
o.Key.jud_fullname,
o.Key.jud_initials,
o.Key.office_code,
o.Key.office_description,
o.Key.office_description_long,
o.Key.case_number,
o.Key.py_def_num,
o.Key.py_first_name,
o.Key.py_middle_name,
o.Key.py_last_name,
o.Key.prisoner_location,
o.Key.prisoner_id,
akas = o.Aggregate(new System.Text.StringBuilder(), (cur, nxt) => cur.AppendFormat(", {0}", nxt.aka_fullname)).ToString().Substring(2),
o.Key.py_role,
o.Key.ro_description,
o.Key.ro_description_plu,
o.Key.at_first_name,
o.Key.at_middle_name,
o.Key.at_last_name,
o.Key.at_start_date,
o.Key.at_end_date
});
var tmp2 = tmp1.GroupBy(
a => new
{
a.office_code,
a.office_description,
a.office_description_long,
a.jud_initials,
a.jud_fullname,
a.event_description,
a.event_date,
a.loc_description,
}
).Select(
alpha => new
{
alpha.Key.office_code,
alpha.Key.office_description,
alpha.Key.office_description_long,
alpha.Key.jud_initials,
alpha.Key.jud_fullname,
alpha.Key.event_description,
alpha.Key.event_date,
alpha.Key.loc_description,
cnt = alpha.Count(),
cases = alpha.GroupBy(b => new
{
b.short_title
}).Select(bravo => new
{
bravo.Key.short_title,
cnt = bravo.Count(),
roles = bravo.GroupBy(c => new
{
c.ro_description,
c.ro_description_plu
}).Select(charlie => new
{
role = charlie.Key.ro_description,
role_plu = charlie.Key.ro_description_plu,
cnt = charlie.Count(),
parties = charlie.GroupBy(d => new
{
d.case_number,
d.py_def_num,
d.py_first_name,
d.py_middle_name,
d.py_last_name
}).Select(delta => new
{
delta.Key.case_number,
delta.Key.py_def_num,
delta.Key.py_first_name,
delta.Key.py_middle_name,
delta.Key.py_last_name
})
})
})
}
);
var str = new System.Text.StringBuilder();
var myCal = new Ical.Net.Calendar();
foreach (var proceedings in tmp2)
{
str = new System.Text.StringBuilder();
str.Append(string.Format("Office \t: {0}-{1} {2}",
proceedings.office_code.ToString().Trim(),
proceedings.office_description.ToString().Trim(),
proceedings.office_description_long
));
str.Append("\n");
str.Append(string.Format("Judge \t: {0}", proceedings.jud_fullname));
str.Append("\n");
str.Append(string.Format("Event \t: {0}", proceedings.event_description));
str.Append("\n");
str.Append(new string('-', 60));
str.Append("\n");
foreach (var cases in proceedings.cases)
{
str.Append(string.Format("{0} \n", cases.short_title));
// str.Append("\n");
// str.Append("\n");
// str.Append("--\n");
foreach (var roles in cases.roles)
{
str.Append(string.Format("\t{0} ({1}) \n", roles.role, roles.role_plu));
// str.Append("\n");
foreach (var parties in roles.parties)
{
str.Append(string.Format("\t\t {0}-{1} : {2} {3} {4} ",
parties.case_number,
parties.py_def_num,
parties.py_first_name,
parties.py_middle_name,
parties.py_last_name
).Replace(" ", " ").Replace("- :", " :"));
str.Append("\n");
}
}
}
string zone = Environment.GetEnvironmentVariable("TZ");
var evt = new CalendarEvent()
{
Class = "PUBLIC",
Start = new Ical.Net.DataTypes.CalDateTime(
Convert.ToDateTime(proceedings.event_date.ToString()), zone
),
End = new Ical.Net.DataTypes.CalDateTime(
Convert.ToDateTime(proceedings.event_date.ToString()), zone
),
Summary = string.Format("{0}-{1}\n",
proceedings.jud_initials.ToString().Trim(),
proceedings.event_description.ToString().Trim()
),
Description = str.ToString(),
Location = string.Format("{0}", proceedings.loc_description.ToString().Trim())
};
myCal.Events.Add(evt);
}
var serializer = new CalendarSerializer(new SerializationContext());
var icalString = serializer.SerializeToString(myCal);
return new ContentResult
{
ContentType = "text/calendar",
StatusCode = (int)HttpStatusCode.OK,
Content = icalString.ToString()
};
// return Ok(tmp2);
// var str = new System.Text.StringBuilder();
// var myCal = new Ical.Net.Calendar();
// foreach (var dr in tmp2)
// {
// str = new System.Text.StringBuilder();
// str.Append(string.Format("Office \t: {0}-{1} {2}",
// dr.office_code.ToString().Trim(),
// dr.office_description.ToString().Trim(),
// dr.office_description_long
// ));
// str.Append("\n");
// str.Append(string.Format("Judge \t: {0}", dr.jud_fullname));
// str.Append("\n");
// str.Append(string.Format("Event \t: {0}", dr.event_description));
// str.Append("\n");
// str.Append(string.Format("Title \t: {0}\n", dr.short_title));
// str.Append("\n");
// str.Append(new string('-', 60));
// str.Append("\n");
// foreach (var subitem in dr.roles)
// {
// foreach (var subitem2 in subitem.cases)
// {
// str.Append(string.Format("{0} : \t {1}-{2} : {3} {4} {5} \n",
// subitem.ro_description_plu,
// subitem2.case_number,
// subitem2.py_def_num,
// subitem2.py_first_name,
// subitem2.py_middle_name,
// subitem2.py_last_name
// ).Replace(" ", " ").Replace("- :", " :"));
// }
// }
// str.Append(new string('-', 60));
// str.Append("\n");
// string zone = "America/Puerto_Rico";
// var evt = new CalendarEvent()
// {
// Class = "PUBLIC",
// Start = new Ical.Net.DataTypes.CalDateTime(
// Convert.ToDateTime(dr.event_date.ToString()), zone
// ),
// End = new Ical.Net.DataTypes.CalDateTime(
// Convert.ToDateTime(dr.event_date.ToString()), zone
// ),
// Summary = string.Format("{0}-{1}\n",
// dr.jud_initials.ToString().Trim(),
// dr.event_description.ToString().Trim()
// ),
// Description = str.ToString(),
// Location = string.Format("{0}", dr.loc_description.ToString().Trim())
// };
// myCal.Events.Add(evt);
// }
// var serializer = new CalendarSerializer(new SerializationContext());
// var icalString = serializer.SerializeToString(myCal);
// return new ContentResult
// {
// ContentType = "text/calendar",
// StatusCode = (int)HttpStatusCode.OK,
// Content = icalString.ToString()
// };
// return Ok(tmp2);
// var serializer = new Ical.Net.Serialization.CalendarSerializer();
// String output = serializer.SerializeToString(myCal);
// XElement doc = new XElement("html",
// new XElement("head", new XElement("title", "Schedule")),
// new XElement("body", new XElement("div", "Loading...."))
// );
// return Ok(doc.ToString());
// return Ok(tmp2);
// return new ContentResult {
// ContentType="text/html",
// StatusCode=(int) HttpStatusCode.OK,
// Content=doc.ToString()
// };
}
[HttpGet("proceedings")]
public async Task<IActionResult> GetProceedings([FromQuery] UserParams userParams)
{
var qry = await _repo.GetProceedingsAsync(userParams);
Response.AddPagination(qry.CurrentPage, qry.PageSize, qry.TotalCount, qry.TotalPages);
return Ok(qry);
}
[HttpGet("patapon")]
public async Task<IActionResult> GetPataponAsync()
{
DateTime today = DateTime.Now;
string desde = today.AddDays(0).ToShortDateString();
string hasta = today.AddDays(0).ToShortDateString();
db.Database.SetCommandTimeout(0);
var tmp1 = await (
from sd in db.u_schedule
join r1 in db.codes
on new { col_a = sd.sd_loc, col_b = "location" }
equals new { col_a = r1.co_code, col_b = r1.co_type } into child1
from loc in child1.DefaultIfEmpty()
join r2 in db.deadlines on new { col_a = sd.sd_class, col_b = sd.sd_type } equals new { col_a = r2.dl_class, col_b = r2.dl_type } into child2
from dl in child2.DefaultIfEmpty()
join r3 in db.u_person on new { col_a = sd.sd_judge_prid ?? 0, col_b = "jud" } equals new { col_a = r3.pr_prid, col_b = r3.pr_type } into child3
from jud in child3.DefaultIfEmpty()
join r4 in db.u_case on sd.sd_caseid equals r4.cs_caseid into child4
from cs in child4.DefaultIfEmpty()
join r41 in db.u_case on new
{ col_a = cs.cs_sort_year, col_b = cs.cs_type, col_c = cs.cs_number, col_d = cs.cs_office, col_e = 0 }
equals new
{ col_a = r41.cs_sort_year, col_b = r41.cs_type, col_c = r41.cs_number, col_d = r41.cs_office, col_e = r41.cs_def_num } into child41
from cs2 in child41.DefaultIfEmpty()
join r42 in db.codes on new { col_a = cs.cs_office, col_b = "office" } equals new { col_a = r42.co_code, col_b = r42.co_type } into child42
from ofi in child42.DefaultIfEmpty()
join r5 in db.u_party on new { col_a = sd.sd_caseid, col_b = 0 } equals new { col_a = r5.py_caseid, col_b = r5.py_aliaseq } into child5
from pty in child5.DefaultIfEmpty()
// join r6 in db.roletype on pty.py_role equals r6.ro_code into child6
// from rt in child6.DefaultIfEmpty()
// join r7 in db.u_attorney on new { col_a = pty.py_caseid, col_b = pty.py_seqno } equals new { col_a = r7.at_caseid, col_b = r7.at_party_seqno } into child7
// from aty in child7.DefaultIfEmpty()
// join r8 in db.u_party on new { col_a = pty.py_caseid, col_b = pty.py_seqno, col_c = "aka" } equals new { col_a = r8.py_caseid, col_b = r8.py_seqno, col_c = r8.py_alias_type } into child8
// from aka in child8.DefaultIfEmpty()
// join r9 in db.u_cr_location on pty.py_caseid equals r9.loc_caseid into child9
// from usm in child9.DefaultIfEmpty()
where (sd.sd_dtset >= DateTime.Parse(desde) && sd.sd_dtset <= DateTime.Parse(hasta))
&& (sd.sd_class == "appt" || sd.sd_class == "hrg")
// && (rt.ro_code == "pla" || rt.ro_code == "dft")
&& sd.sd_date_term == null
// && usm.loc_date_end == null
let hh = Int32.Parse((sd.sd_tmset == null ? "00:00" : sd.sd_tmset).Substring(0, 2))
let hh2 = sd.sd_tmset_am_pm == null ? 0 : sd.sd_tmset_am_pm.ToLower() == "pm" ? 12 : 0
let mm = Int32.Parse((sd.sd_tmset == null ? "00:00" : sd.sd_tmset).Substring(3, 2))
let dt = sd.sd_dtset.Value.AddHours(hh).AddHours(hh2).AddMinutes(mm)
orderby
jud.pr_last_name,
jud.pr_first_name,
dt,
pty.py_role descending,
cs.cs_case_number,
pty.py_def_num,
pty.py_last_name
// aty.at_last_name,
// aty.at_first_name
// let case_num = cs.cs_case_number ?? ""
select new
{
loc_code = loc.co_code ?? "",
loc_description = (loc.co_translation ?? "").Replace("&#039;", "'"),
loc_description_long = (loc.co_misc ?? "").Replace("&#039;", "'"),
event_description = (dl.dl_description ?? "").Trim(),
event_date = dt,
event_date_term = sd.sd_date_term,
sd_text = sd.sd_text ?? "",
short_title = cs2.cs_short_title != null ? cs2.cs_short_title : cs.cs_short_title != null ? cs.cs_short_title : "",
jud_id = sd.sd_judge_prid,
jud_fullname = string.Format("{0} {1} {2}", (jud.pr_first_name ?? "").Trim(), (jud.pr_middle_name ?? "").Trim(), (jud.pr_last_name ?? "").Trim()),
jud_initials = (jud.pr_initials ?? "").Trim(),
office_code = ofi.co_code ?? "",
office_description = ofi.co_translation ?? "",
office_description_long = ofi.co_misc ?? "",
case_number = (cs.cs_case_number ?? "").Trim().ToUpper().Substring(0, 13),
pty.py_def_num,
py_first_name = (pty.py_first_name ?? "").Trim(),
py_middle_name = (pty.py_middle_name ?? "").Trim(),
py_last_name = (pty.py_last_name ?? "").Trim(),
// prisoner_location =
// (usm.loc_code ?? "").Trim() == "LC" ? "(UC)" :
// (usm.loc_code ?? "").Trim() == "LR" ? "(UB)" : "",
// prisoner_id = (pty.py_prisoner_id ?? "").Trim(),
// aka_fullname = string.Format("{0} {1} {2}", (aka.py_first_name ?? "").Trim(), (aka.py_first_name ?? "").Trim(), (aka.py_last_name ?? "").Trim()).Trim(),
// py_role = (pty.py_role ?? "").Trim(),
// ro_description = (rt.ro_description ?? "").Trim(),
// ro_description_plu = (rt.ro_description_plu ?? "").Trim(),
// at_first_name = (aty.at_first_name ?? "").Trim(),
// at_middle_name = (aty.at_middle_name ?? "").Trim(),
// at_last_name = (aty.at_last_name ?? "").Trim(),
// at_start_date = aty.at_start_date,
// at_end_date = aty.at_end_date
})
.Distinct().ToListAsync();
return Ok(tmp1);
}
}
}
docker logs c116f732603f
info: CalendarService.API.Program[0]
START
info: CalendarService.API.Program[0]
END
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app
warn: Microsoft.EntityFrameworkCore.Query[200500]
The LINQ expression 'orderby [r3]?.pr_last_name asc, [r3]?.pr_first_name asc, Convert([sd].sd_dtset, DateTime).AddHours(Convert(Parse(IIF(([sd].sd_tmset == null), "00:00", [sd].sd_tmset).Substring(0, 2)), Double)).AddHours(Convert(IIF(([sd].sd_tmset_am_pm == null), 0, IIF(([sd].sd_tmset_am_pm.ToLower() == "pm"), 12, 0)), Double)).AddMinutes(Convert(Parse(IIF(([sd].sd_tmset == null), "00:00", [sd].sd_tmset).Substring(3, 2)), Double)) asc, [r5]?.py_role desc, [r4]?.cs_case_number asc, [r5]?.py_def_num asc, [r5]?.py_last_name asc' could not be translated and will be evaluated locally.
warn: Microsoft.EntityFrameworkCore.Query[200500]
The LINQ expression 'Distinct()' could not be translated and will be evaluated locally.
fail: Microsoft.EntityFrameworkCore.Query[100100]
An exception occurred in the database while iterating the results of a query for context type 'CalendarService.API.Context.CalendarServiceContext'.
System.ArgumentException: Invalid argument
at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended)
at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value)
at IBM.Data.DB2.Core.DB2Connection..ctor(String connectionString)
at IBM.EntityFrameworkCore.Storage.Internal.Db2SqlConnection.CreateDbConnection()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.BufferlessMoveNext(Boolean buffer, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.DistinctAsyncIterator`1.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext(CancellationToken cancellationToken)
System.ArgumentException: Invalid argument
at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended)
at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value)
at IBM.Data.DB2.Core.DB2Connection..ctor(String connectionString)
at IBM.EntityFrameworkCore.Storage.Internal.Db2SqlConnection.CreateDbConnection()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.BufferlessMoveNext(Boolean buffer,
CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.DistinctAsyncIterator`1.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext(CancellationToken cancellationToken)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HM90HV40355P", Request id "0HM90HV40355P:00000001": An unhandled exception was thrown by the application.
System.ArgumentException: Invalid argument
at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended)
at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value)
at IBM.Data.DB2.Core.DB2Connection..ctor(String connectionString)
at IBM.EntityFrameworkCore.Storage.Internal.Db2SqlConnection.CreateDbConnection()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.BufferlessMoveNext(Boolean buffer,
CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.Initialize(CancellationToken cancellationToken)
at System.Linq.OrderedAsyncEnumerable`2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.DistinctAsyncIterator`1.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken)
at CalendarService.API.Controllers.ICalController.GetPataponAsync() in /src/Controllers/ICalController.cs:line 1003
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment