Я хочу реализовать функцию электронной почты, чтобы пользователь мог отправлять электронную почту в профили, которые не входили в систему в течение 20 дней, и я хочу повторять ее каждые 10 дней.
I have three tables
1) "details" table where profile is maintained.
2) "notify" table where i keep a track of notification send to profiles.
3) "profile" table where i keep track of the login information of profile.
пока я пробовал это-
list = (from c in ctx.details.AsEnumerable()
join u in ctx.profile.AsEnumerable()
join a in ctx.notify..AsEnumerable()
on c.profileid equals u.profileid equals a.profileid
where (u.last_login_date == null &&
(DateTime.Now - u.last_login_date).TotalDays >= 20)
select new details
{
profileid = c.profileid.ToString(),
firstname = c.firstname,
lastname = c.lastname,
email = c.email
}).ToList();
где alert_date - дата, если он был отправлен по электронной почте ранее, а last_login_date -
дата, когда он в последний раз вошел в профиль.
Но я уверен, что это не сработает. Я хочу, чтобы таблица подробностей была заполнена деталями.
Помоги мне.