public async Task <bool> UpdatePersonBiography(PersonBiography entity) { string query = @" UPDATE [PersonBiography] SET [PersonId] = @PersonId ,[BiographyText] = @BiographyText ,[DateCreated] = @DateCreated ,[DateModified] = @DateModified ,[IsActive] = @IsActive WHERE Id = @Id"; return(await Execute(query, new DynamicParameters(entity)) > 0); }
public async Task <string> CreatePersonBiography(PersonBiography entity) { string query = @" INSERT INTO [PersonBiography] ([Id] ,[PersonId] ,[BiographyText] ,[DateCreated] ,[DateModified] ,[IsActive]) OUTPUT INSERTED.Id VALUES (@Id ,@PersonId ,@BiographyText ,@DateCreated ,@DateModified ,@IsActive)"; return(await QueryFoD <string>(query, new DynamicParameters(entity))); }
public async Task <bool> SavePersonBiography(string personId, string biographyText) { bool success = false; var biography = await _mgrFcc.GetPersonBiographyByPersonId(personId); if (biography != null) { biography.BiographyText = biographyText; await _mgrFcc.UpdatePersonBiography(biography); } else { biography = new PersonBiography(); biography.Id = Guid.NewGuid().ToString(); biography.BiographyText = biographyText; biography.PersonId = personId; await _mgrFcc.SetPersonBiography(biography); } return(success); }
public async Task <bool> UpdatePersonBiography(PersonBiography entity) { return(await _repo.UpdatePersonBiography(entity)); }
public async Task <string> SetPersonBiography(PersonBiography entity) { return(await _repo.CreatePersonBiography(entity)); }