public CreateSomeDataCommand BuildCreateSomeDataCommand(ApplicationUserId applicationUserId) { return(new CreateSomeDataCommand(id, firstName, middleName, lastName, title, new Color(color), creationDate, new FacebookUrl(facebookUrl), applicationUserId)); }
public ApplicationUser() { ApplicationUserId = _nextId; StringId = ApplicationUserId.ToString(); _nextId++; PermissionLevels = new List <SelectListItem>(); foreach (var name in Enum.GetValues(typeof(Permissions))) { PermissionLevels.Add(new SelectListItem() { Value = ((int)name).ToString(), Text = name.ToString() }); } Access = Permissions.Basic; }
public CreateSomeDataCommand(Guid id, string firstName, string middleName, string lastName, string title, Color color, DateTime creationDate, FacebookUrl facebookUrl, ApplicationUserId applicationUserId) { Id = id; FirstName = firstName; MiddleName = middleName; LastName = lastName; Title = title; Color = color; CreationDate = creationDate; FacebookUrl = facebookUrl; ApplicationUserId = applicationUserId; }
public bool CheckUserAdmin(ApplicationUser user) { return(ApplicationUserId.Equals(user.Id)); }
public BusinessUser GetByApplicationUserId(ApplicationUserId id, SomeDataContext dbContext) { return(dbContext.BusinessUsers.FirstOrDefault(u => u.IdentityId == id.Value)); }