un positionnement de paramètre workflow des pros

This commit is contained in:
Paul Schneider 2017-01-13 16:31:40 +01:00
commit 96746fcc0b
322 changed files with 25893 additions and 3844 deletions

View file

@ -19,7 +19,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using Microsoft.AspNet.SignalR;
using Microsoft.Data.Entity;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
@ -27,8 +26,7 @@ using System.Linq;
namespace Yavsc
{
using Models;
using Model.Chat;
using ViewModels.Chat;
using Models.Chat;
public class ChatHub : Hub
{
@ -127,7 +125,7 @@ namespace Yavsc
{
string uname = (Context.User != null) ?
$"[{Context.User.Identity.Name}]" :
$"(anony{name})";
$"({name})";
Clients.All.addMessage(uname, message);
}
@ -155,26 +153,5 @@ namespace Yavsc
}
public List<ChatUserInfo> GetUserList()
{
using (var db = new ApplicationDbContext()) {
var cxsQuery = db.Connections.Include(c=>c.Owner).GroupBy( c => c.ApplicationUserId );
List<ChatUserInfo> result = new List<ChatUserInfo>();
foreach (var g in cxsQuery) {
var uid = g.Key;
var cxs = g.ToList();
var user = cxs.First().Owner;
result.Add(new ChatUserInfo { UserName = user.UserName,
UserId = user.Id, Avatar = user.Avatar, Connections = cxs } );
}
return result;
}
}
}
}