public void Add(UserDto user) { _context.Users.Add(new User() { UserName = user.UserName, Password = user.Password }); _context.SaveChanges(); }
public void Add(UserDTO user) { _context.users.Add(new user { UserName = user.UserName, Password = user.Password }); _context.SaveChanges(); }
public void SendMessage(ChatDTO chatDTO) { _context.Messages.Add(new Message() { Text = chatDTO.Text, UserIdFrom = chatDTO.UserIdFrom, UserIdTo = chatDTO.UserIdTo, CreatedOn = DateTime.Now }); _context.SaveChanges(); }