public forumVoteDTO(Int64 idVote, Nullable<Int64> idForumPost, Nullable<Int64> idPerson, Nullable<DateTime> date, String comment, String ip, forumPostDTO forumPost, personDTO person) { this.idVote = idVote; this.idForumPost = idForumPost; this.idPerson = idPerson; this.date = date; this.comment = comment; this.ip = ip; this.forumPost = forumPost; this.person = person; }
public forumPostDTO(Int64 idForumPost, Nullable<Int64> idSubcategory, Nullable<Int64> idPerson, Nullable<Int64> parent_post, String title, String content_forum, Nullable<DateTime> date, String ip, List<forumPostDTO> forumPosts1, forumPostDTO forumPost1, forumSubcategoryDTO forumSubcategory, personDTO person, List<forumVoteDTO> forumVotes) { this.idForumPost = idForumPost; this.idSubcategory = idSubcategory; this.idPerson = idPerson; this.parent_post = parent_post; this.title = title; this.content_forum = content_forum; this.date = date; this.ip = ip; this.forumPosts1 = forumPosts1; this.forumPost1 = forumPost1; this.forumSubcategory = forumSubcategory; this.person = person; this.forumVotes = forumVotes; }
/// <summary> /// Converts this instance of <see cref="person"/> to an instance of <see cref="personDTO"/>. /// </summary> /// <param name="entity"><see cref="person"/> to convert.</param> public static personDTO ToDTO(this person entity) { if (entity == null) return null; var dto = new personDTO(); dto.idPerson = entity.idPerson; dto.first_name = entity.first_name; dto.last_name = entity.last_name; dto.picture = entity.picture; dto.email = entity.email; dto.active = entity.active; dto.username = entity.username; dto.password = entity.password; dto.last_update = entity.last_update; entity.OnDTO(dto); return dto; }
public bool VerificarPassword(personDTO dto) { try { using (var modelo = new dbSEACEappEntities()) { var entity = modelo.persons.Where(q => q.username == dto.username && q.password == dto.password).Select(q => q).FirstOrDefault(); if (entity != null) { //Elusuario existe. return true; } else { //El usuario no existe return false; } } } catch (Exception) { throw new NotImplementedException(); }; }
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="personDTO"/> converted from <see cref="person"/>.</param> partial static void OnDTO(this person entity, personDTO dto);